Payam Chychi
May 31, 2009 05:05AM
Hey,

im trying to compare the cookie with the remote_addr via nginx but
nginx sees $remote_addr as the text and not the a variable ... so it
wont match properly
I do have two cookies... the one I need to match for is the 2nd cookie
"YPF8827340282Jdskjhfiw_928937459182JAX666=96.48.77.222"

if ( $http_cookie !~
YPF8827340282Jdskjhfiw_928937459182JAX666=$remote_addr ) {
rewrite ^(.*)$ /check/$host.shtml last;
break;
}

2009/05/31 02:01:29 [debug] 1775#0: *6 http script regex:
"YPF8827340282Jdskjhfiw_928937459182JAX666=$remote_addr"
2009/05/31 02:01:29 [notice] 1775#0: *6
"YPF8827340282Jdskjhfiw_928937459182JAX666=$remote_addr" does not
match "YPF8827340282Jdskjhfiw_9289374591823=2;
YPF8827340282Jdskjhfiw_928937459182JAX666=96.48.77.222", client:
96.48.77.222, server: www.whatwentwrong.org, request: "GET /index.html
HTTP/1.1", host: "www.whatwentwrong.org", referrer:
"http://www.whatwentwrong.org/index.html"

any ideas?

Thanks in advance
--
Payam Tarverdyan Chychi
Network Security Specialist / Network Engineer
Subject Author Posted

nginx cookie - how to inject variable into cookie

Payam Chychi May 31, 2009 05:05AM

Re: nginx cookie - how to inject variable into cookie

Maxim Dounin June 01, 2009 06:45AM

Re: nginx cookie - how to inject variable into cookie

Payam Chychi June 01, 2009 11:01PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready