playframework / playframework/play1
Request.remoteAddress returns multiple IP's where a client has used a proxy
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 671
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
Play Version
1.5.3
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
Ubuntu
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
JDK 8
Expected Behavior
Request.remoteAddress should only return one IP address of the client's IP.
Actual Behavior
In cases where a request has made multiple 'hops' through proxies, and a x-forwarded-for header has been populated with the client IP plus the proxy addresses as per the specification (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) e.g X-Forwarded-For: , , then calling Request.remoteAddress actually returns a comma separated list rather than a single IP address.
Contributor guide
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.
Research direction
Start by locating the Request.remoteAddress entry point and reviewing how the X-Forwarded-For header is handled for multiple proxy hops. The change is complete when remoteAddress returns one client IP instead of a comma-separated list; no specific file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100