"invalid request counter" response when using reverse proxy [message #1748291] |
Mon, 21 November 2016 15:25  |
Eclipse User |
|
|
|
Hi,
We want to use a reverse nginx proxy in front of our RAP server, but the second xhr POST request to the page fails with HTTP return code 412 and the message "invalid request counter" in the returned JSON payload. I suspected this has something to do with cookies, but the cookie header is send correctly by the browser. I also don't see a stack trace or anything on the console.
Is there anything else to take into account when configuring a reverse proxy? Or does anything somehow reset the requestCounter?
Thanks and best regards,
Max
|
|
|
|
|
Re: "invalid request counter" response when using reverse proxy [message #1748319 is a reply to message #1748309] |
Tue, 22 November 2016 03:53   |
Eclipse User |
|
|
|
Hi there,
this problems occurs when you send a request which contains an invalid request counter. Here I have an example of the json-object which is within an http-request:
{"head":{"requestCounter":11},"operations":[["set","w2",{"activeControl":"w11"}],["set","w11",{"selection":[3,3],"text":"ssa"}],["set","w2",{"activeControl":"w13"}],["notify","w13","Selection",{"button":1,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w1",{"cursorLocation":[272,482],"focusControl":"w13"}]]}
When you look at the position , it contains the value . In case you want to send a request which is not fired by some user interactions on the UI, the requestCounter has to be increased by 1 for each request, you send to the server. Otherwise you don't get a correct response.
You could see the requestCounter as a protection for fuzzing attacks. Normally the requestCounter updates the values by itself but only when you have direct interactions with some GUI components like button-clicks etc.
I hope I could help you!
Best regards,
Aziz
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04832 seconds