njvack / libstats

Automatically exported from code.google.com/p/libstats
GNU General Public License v2.0
1 stars 0 forks source link

No response on invalid login credentials #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the login page
2. Enter a wrong username or a password
3. click 'Log In'

What is the expected output? What do you see instead?
A message saying that login credentials are invalid. Instead it gives a server 
error saying that login.do cannot be retrieved.

What version of the product are you using? On what operating system?
Libstats 1.0.6
Solaris 10
PHP 5.2.11
Apache 2.2.15

Please provide any additional information below.
-

Original issue reported on code.google.com by dhan...@gmail.com on 30 Mar 2011 at 5:35

GoogleCodeExporter commented 9 years ago
I'm not exactly sure if what you mention is what I was experiencing, but it 
sounds quite similar. Instead of an error message, we would get a blank page 
after a failed login. Circulation was quite confused by this.

I've fixed this in the hacked up version we're running, but I have no idea what 
I did now as it's been 11 months.

I'll give as much help as I can, though, by looking at the file changes from 
1.0.6:

UserFinder.php. I think it was falling back to ldap if auth failed, so we want 
to make sure ldap is even enabled.
Starting at line 18:
global $ldapConfig, $use_ldap;

if ($result = $this->authenticateDB($username,$password)) {
    return $result;
} else {
    if ($use_ldap) {
        $this->ldapConn = @ldap_connect($ldapConfig['host'], $ldapConfig['port']);
        if ($this->ldapConn) {
            return $this->authenticateLDAP($username, $password);
        }
    }
    return false;
}

LoginAction.php. Something was wrong with the page it was sending you to on 
login fail.
At line 30, I changed it to:
'content' => 'content/loginFailForm.php');

Then you create the loginFailForm.php script (mine is attached).

Original comment by greenwoo...@gmail.com on 7 Apr 2011 at 8:01

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch :-)
I'll try it out

Original comment by dhan...@gmail.com on 9 Apr 2011 at 12:17