From c7c397ca39f6d5e1dc79ed27a26b855ee73ff956 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Tue, 25 Nov 2014 09:05:20 +1300 Subject: [PATCH] MDL-20365 auth_db: post integration tweaks * Fixes SQL indentation. * Amended the new auth_dbsaltedcrypt string. --- auth/db/auth.php | 3 ++- auth/db/lang/en/auth_db.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/auth/db/auth.php b/auth/db/auth.php index 4885484a295..cef314d0314 100644 --- a/auth/db/auth.php +++ b/auth/db/auth.php @@ -105,7 +105,8 @@ class auth_plugin_db extends auth_plugin_base { $authdb = $this->db_init(); - $rs = $authdb->Execute("SELECT {$this->config->fieldpass} FROM {$this->config->table} + $rs = $authdb->Execute("SELECT {$this->config->fieldpass} + FROM {$this->config->table} WHERE {$this->config->fielduser} = '".$this->ext_addslashes($extusername)."'"); if (!$rs) { $authdb->Close(); diff --git a/auth/db/lang/en/auth_db.php b/auth/db/lang/en/auth_db.php index fb2ce13d458..ac3e64568fc 100644 --- a/auth/db/lang/en/auth_db.php +++ b/auth/db/lang/en/auth_db.php @@ -49,7 +49,7 @@ $string['auth_dbpasstype'] = '

Specify the format that the password field is u $string['auth_dbpasstype_key'] = 'Password format'; $string['auth_dbreviveduser'] = 'Revived user {$a->name} id {$a->id}'; $string['auth_dbrevivedusererror'] = 'Error reviving user {$a}'; -$string['auth_dbsaltedcrypt'] = 'Salted crypt()'; +$string['auth_dbsaltedcrypt'] = 'Crypt one-way string hashing'; $string['auth_dbsetupsql'] = 'SQL setup command'; $string['auth_dbsetupsqlhelp'] = 'SQL command for special database setup, often used to setup communication encoding - example for MySQL and PostgreSQL: SET NAMES \'utf8\''; $string['auth_dbsuspenduser'] = 'Suspended user {$a->name} id {$a->id}';