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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zaphod at s4r dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 20:01:27 2025 UTC