rule.ip does not respect http-proxy
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by inspecting the ejabberd_http handling of X-Real-IP and the rule.ip checks used by api_permissions. Reproduce the setup behind an HTTP reverse proxy using the shown nginx headers, then verify that an internal-only permission is not exposed and that the client IP is interpreted correctly.
Written by the indexing model from the issue text.
Description
Environment
- ejabberd version: 19.09.1
- Erlang version:
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.5 - OS: Archlinux
- Installed from: distro package
Bug description
If there is a http reverse proxy in front of ejabberd module: ejabberd_http it does not handle the HTTP Header-Field X-Real-IP.
(eg. nginx):
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
So api_permissions would be leaked public:
api_permissions:
"onlyinternal":
who:
ip: ::1/128
- Dominant language
- Erlang
- Stars
- 6.7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
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.
More from processone/ejabberd
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
processone/ejabberd#4597 ·
-
API permissions Open
processone/ejabberd#4619 · 3 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
processone/ejabberd#4616 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
processone/ejabberd#4614 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
processone/ejabberd#4613 · 1 comment ·
All issues in processone/ejabberd
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·