Invalid character found in the request target on Confluence behind nginx

Dung Tran Tien dung.trantien at axonactive.com
Tue Dec 11 03:15:52 UTC 2018


Hi there,

Thanks for your feedback, below is location block.

   location /confluence {

        proxy_set_header X-Forwarded-Host $host;

        proxy_set_header X-Forwarded-Server $host;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_pass http://1.1.2.1:8090/confluence;

        proxy_read_timeout  200;

}

Here is access log record on nginx

14.161.32.199 - - [11/Dec/2018:04:06:51 +0100] "GET /confluence/display/AII/5.+test+%3E+A?src=contextnavpagetreemode HTTP/2.0" 400 2490 "https://jira.a.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"



Honesty, I did not find any useful info from tcpdump related this issue. I tried to enable Tomcat http access log on Confluence, but not found this request above.




Your sincerely,
Dung






-----Original Message-----
From: nginx <nginx-bounces at nginx.org> On Behalf Of Francis Daly
Sent: Tuesday, December 11, 2018 6:10 AM
To: nginx at nginx.org
Subject: Re: Invalid character found in the request target on Confluence behind nginx



On Mon, Dec 10, 2018 at 06:43:13AM +0000, Dung Tran Tien wrote:



Hi there,



> Currently I'm using Confluene 6.10.2 behind nginx. I have some pages with the page name including character '>' could not accessible, the error is:



> But when I access the page bypassing the reverse proxy, it's ok, so it could be a problem in nginx.



It sounds like the request from the client includes a correctly-encoded string %3E, while the request from nginx includes the decoded character >.



Can you show the location{} block in nginx that handles this request? Perhaps there is something there that caused the decoding, that can be changed.



Possibly you can use something like "tcpdump" to see the actual requests, if the logs do not show the details.



Good luck with it,



              f

--

Francis Daly        francis at daoine.org<mailto:francis at daoine.org>

_______________________________________________

nginx mailing list

nginx at nginx.org<mailto:nginx at nginx.org>

http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20181211/097aed9d/attachment.html>


More information about the nginx mailing list