php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22170 PEAR::Auth 1.1.1 reports success even if table-access fails
Submitted: 2003-02-11 10:25 UTC Modified: 2003-02-12 00:51 UTC
From: zaphod at s4r dot de Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.3.0 OS:
Private report: No CVE-ID: None
 [2003-02-11 10:25 UTC] zaphod at s4r dot de
When there is an error (eg. typo in tablename) in the connection settings for Auth, getAuth returns true == success even if the check fails. The reason is in the method Auth::login:

        if (!empty($this->username)) {
            $login_ok = $this->storage->fetchData($this->username, $this->password);
        }

$this->storage->fetchData returns an PEAR-Error-object, which will be treated like true == success in the method.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-12 00:51 UTC] mj@php.net
This bug has been fixed in CVS already. The changes will 
be part of the next release. 
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 21 13:03:37 2021 UTC