Skip to content

fix(database): Fix public_key_credential_id length - #36769

Closed
zevlee wants to merge 1 commit into
nextcloud:masterfrom
zevlee:fix-public-key-credential-id
Closed

fix(database): Fix public_key_credential_id length#36769
zevlee wants to merge 1 commit into
nextcloud:masterfrom
zevlee:fix-public-key-credential-id

Conversation

@zevlee

Copy link
Copy Markdown

Summary

Increases length of column for security key so that it fits. This is essentially an identical migration step to nextcloud/twofactor_webauthn#323.

Checklist

@szaimenszaimen added the 3. to review Waiting for reviews label Feb 18, 2023
@szaimen
szaimen requested review from a team, ArtificialOwl, blizzz and icewind1991 and removed request for a teamFebruary 18, 2023 02:23
@szaimenszaimen added this to the Nextcloud 26 milestone Feb 18, 2023
Comment threadcore/Migrations/Version25000Date20230217195657.php Fixed
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {

Check failure

Code scanning / Psalm

UndefinedClass

Class, interface or enum named OC\Core\Migrations\ISchemaWrapper does not exist
@skjnldsvskjnldsv mentioned this pull request Feb 23, 2023
@blizzzblizzz mentioned this pull request Mar 7, 2023
@blizzzblizzz modified the milestones: Nextcloud 26, Nextcloud 27Mar 7, 2023
This was referenced May 3, 2023
@blizzzblizzz mentioned this pull request May 17, 2023
@blizzzblizzz modified the milestones: Nextcloud 27, Nextcloud 28May 23, 2023
@szaimen
szaimen requested a review from a teamMay 26, 2023 14:15
Comment threadcore/Migrations/Version25000Date20230217195657.php Outdated
class Version25000Date20230217195657 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named OC\Core\Migrations\ISchemaWrapper does not exist
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

$registrationsTable = $schema->getTable('webauthn');

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named OC\Core\Migrations\ISchemaWrapper does not exist
->getColumn('public_key_credential_id')
->setLength(512);

return $schema;

Check failure

Code scanning / Psalm

InvalidReturnStatement

The inferred type 'OC\Core\Migrations\ISchemaWrapper' does not match the declared return type 'OCP\DB\ISchemaWrapper&OC\Core\Migrations\ISchemaWrapper|null' for OC\Core\Migrations\Version25000Date20230217195657::changeSchema
@skjnldsvskjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
@blizzzblizzz mentioned this pull request Nov 14, 2023
@blizzzblizzz mentioned this pull request Nov 20, 2023
5 tasks
@blizzzblizzz modified the milestones: Nextcloud 28, Nextcloud 29Nov 23, 2023
This was referenced Mar 12, 2024
This was referenced Mar 20, 2024
@skjnldsvskjnldsv mentioned this pull request Mar 28, 2024
81 tasks

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Please also adjust the original migration that created the column so that new instances have the correct length by default. This should be quicker than creating the wrong width and changing the length right away.

This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsvskjnldsv mentioned this pull request Aug 13, 2024
@skjnldsvskjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
@skjnldsv

Copy link
Copy Markdown
Member

Solved by #47240 🚀

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passwordless WebAuthn with Nitrokey 3 does not work

6 participants

@zevlee@skjnldsv@ChristophWurst@github-advanced-security@blizzz@szaimen