4674: Stacktrace for ldap auth

Misery
chipx86
chipx86

What version are you running?

3.0.3

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

don't know

We use active directory as auth backend.

Please provide any additional information below.

Found this in our logs... I don't know how this happend. Maybe someone tried to use the API with an unknown user?!

But it looks like this error should not happen.

2018-03-19 08:51:57,002 - ERROR - - root - Error when calling get_or_create_user for auth backend <reviewboard.accounts.backends.ActiveDirectoryBackend object at 0x7fab9e9c5990>: get_or_create_user() takes exactly 4 arguments (3 given)
Traceback (most recent call last):
File "/opt/reviewboard/dist/lib/python2.7/site-packages/reviewboard/webapi/resources/review_request.py", line 1352, in _find_user
return backend.get_or_create_user(username, request)
TypeError: get_or_create_user() takes exactly 4 arguments (3 given)

Misery
#1 Misery

ad_user_data is not provided...

ActiveDirectoryBackend:
def get_or_create_user(self, username, request, ad_user_data)

Misery
#2 Misery

Yeah, looks like someone used an existing user for authorization and used "submit_as" for a non-existing user.

chipx86
#3 chipx86

Fix up for review: https://reviews.reviewboard.org/r/9821/

  • -New
    +PendingReview
  • +Release-3.0.x
  • +chipx86
chipx86
#4 chipx86

Fixed in 23411ae7e8e0611b31551bcc9d4955079047eb54.

  • -PendingReview
    +Fixed
  • +Component:Accounts