Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP basic auth headers to default filters #597

Merged
merged 1 commit into from
Sep 14, 2020

Conversation

imjoehaines
Copy link
Contributor

Goal

This PR adds the "authorization" header and related PHP auth headers to the default list of filters. This matches the behaviour of our other server notifiers (e.g. Ruby & Python)

Design

Technically only "authorization" is used as a header, but PHP will parse the username & password (or digest) too when using HTTP basic/digest auth

These aren't counted as headers by PHP (or by bugsnag-php), but Symfony's HTTP Foundation library treats them as headers. Since a lot of other projects also use Symfony's HTTP Foundation (e.g. Laravel), it makes sense to add them as default filters too

Testing

Built on tests added in #596 and manually tested with vanilla PHP, Laravel and Symfony

Technically only 'authorization' is used as a header, but PHP will
parse the username & password (or digest) — these aren't counted
as headers by PHP, but Symfony treats them as headers. Since a lot
of other projects use Symfony's HTTP foundation (e.g. Laravel), it
makes sense to add them as default filters too
@imjoehaines imjoehaines merged commit f45c609 into next Sep 14, 2020
@imjoehaines imjoehaines deleted the http-basic-auth-filters branch September 14, 2020 08:14
@imjoehaines imjoehaines mentioned this pull request Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants