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

Implement multi-value headers #332

Open
theseion opened this issue Jul 9, 2024 · 0 comments
Open

Implement multi-value headers #332

theseion opened this issue Jul 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@theseion
Copy link
Collaborator

theseion commented Jul 9, 2024

The Header type currently doesn't support multiple values for a single header. We need to support requests that include the same header multiple times, possibly with different casings. Examples:

// different casing
Content-Type: application/json
ConTent-tyPE: application/json
// same casing, same or different value
content-type: application/json
content-type: application/json
content-type: application/problem+json

Attackers will throw anything at a web server to break it / break in. That means a web server will see requests that are not valid w.r.t. to RFCs. In this case, the web server might see multiple entries for the same header, with differences in the header name and / or the header value, as shown in the examples above. go-ftw must be able to send such requests in order to test that a WAF can defend against them.

Acceptance criteria

  • it must be possible to specify headers as in the examples above in a test case (YAML)
  • it must be possible to add multiple values to a specific header name
  • retrieving headers must return a map, as a key can map multiple versions of a header
  • Header must not be an alias for map[string]string. Users must be forced to use the methods to ensure proper state of the object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants