From e79781f72e06a4969c673f573987578d1a6c80b1 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 24 Nov 2009 14:39:35 +0000 Subject: [PATCH] MDL-20948 proper removal of cached pasword hashes just in case upgrading from <1.9.7 --- auth/db/auth.php | 3 +++ auth/db/db/install.php | 14 ++++++++++++++ auth/db/version.php | 3 +++ auth/fc/db/install.php | 11 +++++++++++ auth/fc/version.php | 3 +++ auth/imap/db/install.php | 11 +++++++++++ auth/imap/version.php | 3 +++ 7 files changed, 48 insertions(+) create mode 100644 auth/db/db/install.php create mode 100644 auth/db/version.php create mode 100644 auth/fc/db/install.php create mode 100644 auth/fc/version.php create mode 100644 auth/imap/db/install.php create mode 100644 auth/imap/version.php diff --git a/auth/db/auth.php b/auth/db/auth.php index caf57f0c4c..441911cb1e 100644 --- a/auth/db/auth.php +++ b/auth/db/auth.php @@ -576,6 +576,9 @@ class auth_plugin_db extends auth_plugin_base { * @return bool */ function is_internal() { + if (!isset($this->config->passtype)) { + return true; + } return ($this->config->passtype == 'internal'); } diff --git a/auth/db/db/install.php b/auth/db/db/install.php new file mode 100644 index 0000000000..93704bf696 --- /dev/null +++ b/auth/db/db/install.php @@ -0,0 +1,14 @@ +set_field('user', 'password', 'not cached', array('auth'=>'db')); + } + +} diff --git a/auth/db/version.php b/auth/db/version.php new file mode 100644 index 0000000000..a744fcaaf7 --- /dev/null +++ b/auth/db/version.php @@ -0,0 +1,3 @@ +version = 2009112400; diff --git a/auth/fc/db/install.php b/auth/fc/db/install.php new file mode 100644 index 0000000000..53be4b4d21 --- /dev/null +++ b/auth/fc/db/install.php @@ -0,0 +1,11 @@ +set_field('user', 'password', 'not cached', array('auth'=>'fc')); + +} diff --git a/auth/fc/version.php b/auth/fc/version.php new file mode 100644 index 0000000000..a744fcaaf7 --- /dev/null +++ b/auth/fc/version.php @@ -0,0 +1,3 @@ +version = 2009112400; diff --git a/auth/imap/db/install.php b/auth/imap/db/install.php new file mode 100644 index 0000000000..9f43278a0b --- /dev/null +++ b/auth/imap/db/install.php @@ -0,0 +1,11 @@ +set_field('user', 'password', 'not cached', array('auth'=>'imap')); + +} diff --git a/auth/imap/version.php b/auth/imap/version.php new file mode 100644 index 0000000000..a744fcaaf7 --- /dev/null +++ b/auth/imap/version.php @@ -0,0 +1,3 @@ +version = 2009112400; -- 2.39.5