mitre / mitre/HTTP-Proxy-Servlet

Cookie name with illegal characters

Open
#159 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
1.5k
Forks
557
PR merge metrics
No merged PRs in 30d

Description

The Cookie constructor only admits cookie names that are compliant with RFC 2109. The servlet name is used to rename the cookie in getCookieNamePrefix, but if the servlet name contains illegal characters (most likely a white space), then the constructor will throw an exception.

I suggest that illegal characters are replaced by some other character while renaming the cookie.

Thanks.

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 tracing getCookieNamePrefix and how its result is passed to the Cookie constructor. Check the servlet-name handling and the RFC 2109 validation behavior. Done means servlet names containing illegal characters no longer cause cookie construction to fail, with coverage for the reported whitespace case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.