vB strips whitespace from passwords
authorAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 13 Dec 2009 20:24:17 +0000 (20:24 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 13 Dec 2009 20:24:17 +0000 (20:24 +0000)
includes/extauth/vB.php

index a41288c..6f00874 100644 (file)
@@ -76,6 +76,8 @@ class ExternalUser_vB extends ExternalUser {
        public function getName() { return $this->mRow->username; }
 
        public function authenticate( $password ) {
+               # vBulletin seemingly strips whitespace from passwords
+               $password = trim( $password );
                return $this->mRow->password == md5( md5( $password )
                        . $this->mRow->salt );
        }