dropwizard / dropwizard/dropwizard-web

Newlines / Carriage in header values violate HTTP header spec. Will break HTTP/2

Open
#565 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
16
Forks
6
Avg merge
1m
Merged PRs (30d)
3

Description

With headers such as CSP, they tend to be long and hence people naturally break them over multiple lines in config. That then breaks the service as headers with newline/carriage return violate HTTP spec. Seems especially troublesome in HTTP/2.

Attached patch will sanitize the headers and remove the offending characters.

patchfile.txt

(Sorry about the patchfile, didn't have permissions to create a branch and PR etc. The fix is very simple however.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached patchfile.txt and locating the header-value handling described in the issue. Verify that configured header values containing newlines or carriage returns are sanitized, and confirm the resulting headers comply with the HTTP specification, including HTTP/2 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.