4489: LDAP Authenticate error: need more than 1 value to unpack

jafar

What version are you running?

2.5.7

What's the URL of the page containing the problem?

https://github.com/reviewboard/reviewboard/blob/master/reviewboard/accounts/backends.py#L559
https://groups.google.com/forum/#!topic/reviewboard/7zrGkUg1kPI

What steps will reproduce the problem?

  1. GOTO Authentication -> LDAP
  2. SET Full Name Attribute: cn (or something like uid)
  3. That's it!

What is the expected output? What do you see instead?

Arbitrary assume fullname will contains a white space.
Wrong code:

first_name, last_name = full_name.split(' ', 1)

Many people, such as most asian people, they have a fullname but without space!
Example: 张三

You cannot assume your users' fullname contains white space, at least try catch such exception!

What operating system are you using? What browser?

NONE

Please provide any additional information below.

NONE

david
#1 david
  • +Component:Accounts
    +EasyFix
#2 diegor

I have the same problem. The workaround was to use "Given Name Attribute" and "Surname Attribute" together. In the "Full Name Attribute" I configured "gecos" LDAP parameters: this filed could be anything (https://en.wikipedia.org/wiki/Gecos_field) hence it could not contains spaces. Make such assumption is wrong.
Moreover I suggest this good article when dealing with people's names: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/

david
#3 david

We're definitely aware of how names ought to work. Unfortunately, when we started Review Board, the Django included only "First name" and "Last name" fields. They've since made it possible to override and extend the user object, but because we started back then, we're locked into what we have.

david
#4 david

Fixed in release-2.5.x (d7e9803). This will ship in 2.5.17. Thanks!

  • -New
    +Fixed