rabbitmq / rabbitmq-management

RabbitMQ Management UI and HTTP API
https://www.rabbitmq.com/management.html
Other
370 stars 165 forks source link

prevent sending authorization: null header #833

Closed furkhat closed 4 years ago

furkhat commented 4 years ago

Proposed Changes

Add additional check to prevent sending "authorization": "null" and prefer sending no header if no value known.

RabbitMQ version 3.8.5. Firefox version 78.0.1. Using basic authentication request for /whoami sends "authorization": "null" in case if no logins previously were made.

Types of Changes

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask on the mailing list. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further Comments

This is useful for me because I host rabbitmq management ui under a proxy which tries to read authorization header and fails assuming that "null" is invalid token.

michaelklishin commented 4 years ago

Thank you!

michaelklishin commented 4 years ago

Backported to v3.8.x.