Add support for included credentials in webhook targets.

Review Request #8916 - Created April 27, 2017 and submitted

David Trowbridge
Review Board
release-2.5.x
427b75d...
reviewboard

Sometimes, a user may need to dispatch a webhook to an authenticated endpoint.
Django (somewhat sensibly) does not allow inline credentials in URLFields, both
in forms and models, but in this case we want to allow it.

This change makes use of a new backport of Django 1.8's URLValidator, which
supports credentials. The URL is then split and credentials (if included) are
pulled out and added to a HTTPBasicAuthHandler for the url open.

  • Verified that I was able to save webhook targets that included credentials
    in the URL.
  • Checked that things that definitely weren't URLs were still rejected.
  • Ran unit tests.
  • 0
  • 7
  • 4
  • 11
Description From Last Updated
David Trowbridge
Christian Hammond
David Trowbridge
David Trowbridge
Barret Rennie
Christian Hammond
David Trowbridge
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (44f046e)
Loading...