Authorization header added multiple times
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- authentication
Research direction
Trace how the content scanner combines incoming headers with config values from additional_headers and headers_to_forward. Reproduce both cases, then verify that the upstream request contains at most one Authorization header and that a hardcoded configured value is recorded in the logs when it takes precedence.
Written by the indexing model from the issue text.
Description
Describe the bug
If the incoming request to the content scanner includes Authorization header but the config file also has a hardcoded one (using additional_headers option) or it is being asked to forward (using headers_to_forward) then the header gets added to the upstream request multiple times making it fail, without any clear trace
To Reproduce
Steps to reproduce the behavior:
- Configure a hardcoded
Authorizationheader in config withadditional_headers. - Send a request to content scanner with
Authorizationheader.
or
- Configure the
Authorizationheader in config to be forwarded withheaders_to_forward. - Send a request to content scanner with
Authorizationheader.
Expected behavior
At all times, use at most one copy of the Authorization header in the upstream request. If there is a hardcoded one in the config (additional_headers), use this one instead of one in the incoming request - and indicate that in the logs.
Actual behavior
The request fails, there is nothing in the logs which could help you to debug the issue.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
- Dominant language
- Python
- Stars
- 25
- Forks
- 16
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from element-hq/matrix-content-scanner-python
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
element-hq/matrix-content-scanner-python#162 · 1 comment ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
element-hq/matrix-content-scanner-python#78 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
element-hq/matrix-content-scanner-python#77 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
element-hq/matrix-content-scanner-python#56 · 2 reactions ·
All issues in element-hq/matrix-content-scanner-python
Similar issues
-
agent-ready documentation needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
instance instance add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
searxng/searx-instances#939 · 1 comment ·
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100