aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorS1m <git@sgougeon.fr>2024-03-24 12:17:10 +0100
committerJoas Schilling <coding@schilljs.com>2024-08-15 11:03:10 +0200
commit9189bc290bd46e103b859c8366b22562d405fb3b (patch)
treea5b36c34818b44c91d06c9714bfe61f4286e7e83 /core
parente218d1f98e19307f2bf170e09670e4f7fe61f061 (diff)
downloadnextcloud-server-9189bc290bd46e103b859c8366b22562d405fb3b.tar.gz
nextcloud-server-9189bc290bd46e103b859c8366b22562d405fb3b.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.php27
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;
+ }
+}