beefproject / beefproject/beef
Review "IP address has changed" functionality
- Dominant language
- JavaScript
- Stars
- 11k
- Forks
- 2.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
The "IP address has changed" functionality is dodgy. Worse, when `allow_reverse_proxy` is used, the `X-Forwarded-For` header is trusted implicitly without validation.
https://github.com/beefproject/beef/blob/943a6fd2266f2652e64885c499e8f8fb5735ac10/core/main/handlers/hookedbrowsers.rb#L93-L102
Here's an example someone provided, showing that the stored IP address contains two IP addresses separated by `,`.

It may also result in many "IP address has changed" events in load balanced environments. Although I'm not sure that this is avoidable.
Contributor guide
Research direction
Start with core/main/handlers/hookedbrowsers.rb lines 93-102 and trace the "IP address has changed" handling, especially the allow_reverse_proxy path and X-Forwarded-For input. Compare the reported comma-separated address and load-balanced behavior, then define validation and completion criteria before making a change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100