Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / sql / Pg-upgrade2-auth / remove_insecurely_hashed_passwords.sql
diff --git a/sql/Pg-upgrade2-auth/remove_insecurely_hashed_passwords.sql b/sql/Pg-upgrade2-auth/remove_insecurely_hashed_passwords.sql
new file mode 100644 (file)
index 0000000..1ea6b44
--- /dev/null
@@ -0,0 +1,8 @@
+-- @tag: remove_insecurely_hashed_passwords
+-- @description: Passwörter löschen, die mit unsicheren Hash-Verfahren gehasht wurden
+-- @depends: release_3_3_0
+UPDATE auth.user
+SET password = '*'
+WHERE (password IS NOT NULL)
+  AND (password NOT LIKE '{PBKDF2%')
+  AND (password NOT LIKE '{SHA256%');