From ebf40099f2fc73cc5309ddd7fff6a679dc9ae839 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Thu, 10 Oct 2019 17:32:20 +0200 Subject: 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. --- migrations/mysql/2019-10-10-083032_add_column_to_twofactor/down.sql | 0 migrations/mysql/2019-10-10-083032_add_column_to_twofactor/up.sql | 1 + migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/down.sql | 0 migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/up.sql | 1 + migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/down.sql | 0 migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/up.sql | 1 + 6 files changed, 3 insertions(+) create mode 100644 migrations/mysql/2019-10-10-083032_add_column_to_twofactor/down.sql create mode 100644 migrations/mysql/2019-10-10-083032_add_column_to_twofactor/up.sql create mode 100644 migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/down.sql create mode 100644 migrations/postgresql/2019-10-10-083032_add_column_to_twofactor/up.sql create mode 100644 migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/down.sql create mode 100644 migrations/sqlite/2019-10-10-083032_add_column_to_twofactor/up.sql (limited to 'migrations') 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 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 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 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; -- cgit v1.2.3