Welcome! Log In Create A New Profile

Advanced

PCRE

February 24, 2010 06:25AM
Написал в конфиге:
if ($QUERY_STRING ~* ^.*(\\x[a-f0-9][a-f0-9]){3,}.*$) {
return 403;
}
Запускаю
/etc/rc.d/rc.nginx start
Starting Nginx server daemon...
[emerg]: pcre_compile() failed: missing ) in "^.*(\x[a-f0-9][a-f0-9]" in /etc/nginx/nginx.conf:131

Ладно, я не гордый, с учетом того, что могу и три раза скопипастить переписываю так
if ($QUERY_STRING ~* ^.*\\x[a-f0-9][a-f0-9].*$) {
return 403;
}

http://site.ru/page?r=\\xd0\\xb7\xd0\xb2\xd0\xb5\xd1\x80\xd1\x8c+\xd1\x82\xd1\x85\xd0\xbe\xd1\x80
не режектит :(

Смотрю логи:
2010/02/24 14:20:16 [notice] 16197#0: *10 "^.*\x[a-f0-9][a-f0-9].*$" does not match "r=\\xd0\\xb7\xd0\xb2\xd0\xb5\xd1\x80\xd1\x8c+\xd1\x82\xd1\x85\xd0\xbe\xd1\x80

\\x[a-f][0-9] тоже пробовал. Тоже не матчит. Что я не так делаю?
Subject Author Posted

PCRE

anyhow2 February 24, 2010 06:25AM

Re: PCRE

Denis F. Latypoff February 24, 2010 06:44AM

Re: PCRE

anyhow2 February 24, 2010 06:54AM

Re[2]: PCRE

Denis F. Latypoff February 24, 2010 07:08AM

Re: Re[2]: PCRE

anyhow2 February 24, 2010 07:16AM

Re[4]: PCRE

Denis F. Latypoff February 24, 2010 07:26AM

Re: PCRE

Maxim Dounin February 24, 2010 07:04AM

Re: PCRE

anyhow2 February 24, 2010 07:56AM

Re: PCRE

anyhow2 February 24, 2010 08:07AM

Re: PCRE

anyhow2 February 24, 2010 08:14AM

Re: PCRE

anyhow2 February 24, 2010 08:20AM

Re: PCRE

Maxim Dounin February 24, 2010 08:20AM

Re[2]: PCRE

Denis F. Latypoff February 24, 2010 08:32AM

Re: Re[2]: PCRE

anyhow2 February 24, 2010 08:40AM

Re: Re: Re[2]: PCRE

Denis F. Latypoff February 24, 2010 01:24PM

Re: PCRE

anyhow2 February 24, 2010 08:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready