4879: Error when dispatching a webhook with auth credentials: AttributeError: 'SplitResult' object has no attribute 'params'

amiryal

What version are you running?

3.0.18

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

The error shows up in server logs:

2020-09-10 07:54:27,439 - INFO -  - root - Dispatching webhook for event review_request_published to https://username:passw0rd@example.com/path?param=value
2020-09-10 07:54:27,440 - ERROR -  - root - Could not dispatch WebHook to https://username:passw0rd@example.com/path?param=value: 'SplitResult' object has no attribute 'params'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 299, in dispatch_webhook_event
    url_parts.params, url_parts.query))
AttributeError: 'SplitResult' object has no attribute 'params'

Please provide any additional information below.

See my comment on the failing code, which still lives in latest master.

Both Python 3 and legacy Python 2 have the same interface, so it shouldn’t matter that my site is still running on Python 2.

#1 amiryal

I now have a fix running our production site and a forward-ported version of the fix up for review. The proposed patch series also includes additional logging and a fix for sending credentials unconditionally to servers that do not respond with 401.

#2 amiryal

New version of the fix:
https://reviews.reviewboard.org/r/11191/

New version of the logging and fix for sending credentials:
https://reviews.reviewboard.org/r/11192/
https://reviews.reviewboard.org/r/11193/

david
#3 david
  • -New
    +Fixed