diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2013-08-29 22:35:26 +0400 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2013-08-29 22:35:26 +0400 |
commit | 8658c5b8a11c2155e66e1bd1c322099f672f7c15 (patch) | |
tree | b1525497b9412fdf11863200d980cf55fe841bf0 /src/http/ngx_http_request.c | |
parent | 3ef0dfa145513c98b331f75730c3f16e4713cda4 (diff) | |
download | nginx-8658c5b8a11c2155e66e1bd1c322099f672f7c15.tar.gz nginx-8658c5b8a11c2155e66e1bd1c322099f672f7c15.zip |
Referer: fixed server_name regex matching.
The server_name regexes are normally compiled for case-sensitive matching.
This violates case-insensitive obligations in the referer module. To fix
this, the host string is converted to lower case before matching.
Previously server_name regex was executed against the whole referer string
after dropping the scheme part. This could led to an improper matching, e.g.:
server_name ~^localhost$;
valid_referers server_names;
Referer: http://localhost/index.html
It was changed to look only at the hostname part.
The server_name regexes are separated into another array to not clash with
regular regexes.
Diffstat (limited to 'src/http/ngx_http_request.c')
0 files changed, 0 insertions, 0 deletions