diff options
author | S1m <git@sgougeon.fr> | 2024-03-24 12:17:10 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-08-15 11:52:40 +0200 |
commit | b7bf8ec3c59a6eae72e47bc85d7349c73667f3c0 (patch) | |
tree | 915890f2ee8c985cd7a86f62de98d804cc448a4f /core | |
parent | 3b6d9eb774919270728f1d2a68e0527cde74446e (diff) | |
download | nextcloud-server-b7bf8ec3c59a6eae72e47bc85d7349c73667f3c0.tar.gz nextcloud-server-b7bf8ec3c59a6eae72e47bc85d7349c73667f3c0.zip |
feat(webauthn): Add user verification to webauthn challenges
Require user verification if all tokens are registered
with UV flag, else discourage it
Signed-off-by: S1m <git@sgougeon.fr>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'core')
-rw-r--r-- | core/Migrations/Version30000Date20240815080800.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/Migrations/Version30000Date20240815080800.php b/core/Migrations/Version30000Date20240815080800.php new file mode 100644 index 00000000000..c65cd6830c7 --- /dev/null +++ b/core/Migrations/Version30000Date20240815080800.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 S1m <git@sgougeon.fr> + * SPDX-FileCopyrightText: 2024 Richard Steinmetz <richard@steinmetz.cloud> + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OC\Core\Migrations; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version30000Date20240815080800 extends SimpleMigrationStep { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + $table = $schema->getTable('webauthn'); + $table->addColumn('user_verification', Types::BOOLEAN, ['notnull' => false, 'default' => false]); + return $schema; + } +} |