diff options
author | BlackDex <[email protected]> | 2019-10-10 17:32:20 +0200 |
---|---|---|
committer | BlackDex <[email protected]> | 2019-10-10 17:32:20 +0200 |
commit | ebf40099f2fc73cc5309ddd7fff6a679dc9ae839 (patch) | |
tree | 9354ea5be5ede3c4a08956002144146305a54bd1 /migrations | |
parent | 45d9d8db94b35a75a801c85e59c28124db0adb40 (diff) | |
download | vaultwarden-ebf40099f2fc73cc5309ddd7fff6a679dc9ae839.tar.gz vaultwarden-ebf40099f2fc73cc5309ddd7fff6a679dc9ae839.zip |
Updated authenticator TOTP
- Added security check for previouse used codes
- Allow TOTP codes with 1 step back and forward when there is a time
drift. This means in total 3 codes could be valid. But only newer codes
then the previouse used codes are excepted after that.
Diffstat (limited to 'migrations')
6 files changed, 3 insertions, 0 deletions
diff --git a/migrations/mysql/2019-10-10-083032_add_column_to_twofactor/down.sql b/migrations/mysql/2019-10-10-083032_add_column_to_twofactor/down.sql new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/migrations/mysql/2019-10-10-083032_add_column_to_twofactor/down.sql diff --git a/migrations/mysql/2019-10-10-083032_add_column_to_twofactor/up.sql b/migrations/mysql/2019-10-10-083032_add_column_to_twofactor/up.sql new file mode 100644 index 00000000..cfcd6ca2 --- /dev/null +++ b/migrations/mysql/2019-10-10-083032_add_column_to_twofactor/up.sql @@ -0,0 +1 @@ +ALTER TABLE twofactor ADD COLUMN last_used INTEGER NOT NULL DEFAULT 0;
\ No newline at end of file diff --git a/migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/down.sql b/migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/down.sql new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/down.sql diff --git a/migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/up.sql b/migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/up.sql new file mode 100644 index 00000000..cfcd6ca2 --- /dev/null +++ b/migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/up.sql @@ -0,0 +1 @@ +ALTER TABLE twofactor ADD COLUMN last_used INTEGER NOT NULL DEFAULT 0;
\ No newline at end of file diff --git a/migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/down.sql b/migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/down.sql new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/down.sql diff --git a/migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/up.sql b/migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/up.sql new file mode 100644 index 00000000..14d3c683 --- /dev/null +++ b/migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/up.sql @@ -0,0 +1 @@ +ALTER TABLE twofactor ADD COLUMN last_used INTEGER NOT NULL DEFAULT 0; |