HTTP 500 error when logging in with a bad username

Issue #141 resolved
Former user created an issue

When logging in to Rhodecode with a username that does not exist I get a HTTP 500 error with the following stack trace:

{{{ File '/usr/local/lib/python2.6/dist-packages/RhodeCode-1.1.7-py2.6.egg/rhodecode/model/', line 148 in validate_python if authenticate(username, password): File '/usr/local/lib/python2.6/dist-packages/RhodeCode-1.1.7-py2.6.egg/rhodecode/lib/', line 174 in authenticate if str2bool(ldap_settings.get('ldap_active')): File '/usr/local/lib/python2.6/dist-packages/RhodeCode-1.1.7-py2.6.egg/rhodecode/lib/', line 36 in str2bool raise ValueError("String is not true/false: %r" % obj) ValueError: String is not true/false: u'' }}}

Interestingly, I cannot reproduce this on new installs of Rhodecode, only my install from what I think was 1.1.2 upgraded to 1.1.7.

Comments (3)

  1. Marcin Kuzminski repo owner

    I think I know what the problem is, Old RhodeCode versions kept empty settings about ldap as empty strings for bollean values in database, never are storing string value 'false' or 'true', Can You go to Admin Panel then to ldap settings and just put save on the ldap page (with ldap disable checked) that should fix the empty string to 'false', and fix this issue.

  2. Former user Account Deleted

    Hit save on the LDAP page only to be greeted with "Unable to activate ldap. The "python-ldap" library is missing."

    So to quickly fix it I just manually updated the sqlite database and put in false for ldap_active and ldap_ldaps.

  3. Log in to comment