summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_referer_module.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-04Referer: fixed $invalid_referer.Ruslan Ermilov1-14/+25
The variable was considered non-existent in the absence of any valid_referers directives. Given the following config snippet, location / { return 200 $invalid_referer; } location /referer { valid_referers server_names; } "location /" should work identically and independently on other "location /referer". The fix is to always add the $invalid_referer variable as long as the module is compiled in, as is done by other modules.
2016-03-30Style.Ruslan Ermilov1-1/+1
2013-08-29Referer: fixed hostname buffer overflow check.Valentin Bartenev1-3/+3
Because of premature check the effective buffer size was 255 symbols while the buffer is able to handle 256.
2013-08-29Referer: "server_names" parsing deferred to merge phase.Sergey Kandaurov1-33/+45
This allows to approach "server_name" values specified below the "valid_referers" directive when used within the "server_names" parameter, e.g.: server_name example.org; valid_referers server_names; server_name example.com; As a bonus, this fixes bogus error with "server_names" specified several times.
2013-08-29Referer: fixed server_name regex matching.Sergey Kandaurov1-22/+67
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.
2013-08-29Referer: fixed error type usage inconsistency for ngx_http_add*().Sergey Kandaurov1-15/+15
2013-08-13Referer module: fixed regex matching against HTTPS referers.Sergey Kandaurov1-1/+3
When matching a compiled regex against value in the "Referer" header field, the length was calculated incorrectly for strings that start from "https://". This might cause matching to fail for regexes with end-of-line anchors. Patch by Liangbin Li.
2013-05-22Referer module: added $invalid_referer to variables hash.Maxim Dounin1-2/+1
This makes it accessible via dynamic lookup with ngx_http_get_variable() from Perl, SSI, etc. Patch by Yichun Zhang (agentzh).
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-08-18Fix names of the referer hash size directives introduced in r3940.Igor Sysoev1-1/+1
2011-06-28referer_hash_max_size and referer_hash_bucket_size directivesIgor Sysoev1-2/+32
patch by Witold Filipczyk
2010-05-14ngx_str_set() and ngx_str_null()Igor Sysoev1-4/+2
2010-03-03allow HTTPS referersIgor Sysoev1-8/+17
2009-11-16regex named capturesIgor Sysoev1-10/+14
2009-09-14test space between "~" and regex in server_name and invalid_referersIgor Sysoev1-0/+5
2009-09-12If .domain.com, .sub.domain.com, and .domain-some.com were defined,Igor Sysoev1-1/+1
then .sub.domain.com was matched by .domain.com: wildcard names hash was built incorrectly due to sorting order issue of "." vs "-". They were sorted as com.domain com.domain-some com.domain.sub while they should be sorted as com.domain com.domain.sub com.domain-some for correct hash building
2009-06-02return NULL instead of NGX_CONF_ERROR on a create conf failureIgor Sysoev1-1/+1
2007-12-28fix building --without-pcreIgor Sysoev1-0/+4
2007-12-27use ngx_regex_exec_array()Igor Sysoev1-41/+22
2007-12-27regex valid_referers were not inheritedIgor Sysoev1-1/+8
2007-12-10move condition declarations inside blocks where they are usedIgor Sysoev1-5/+3
2007-10-14fix English grammarIgor Sysoev1-1/+1
2007-08-12regex in valid_referersIgor Sysoev1-10/+151
2007-06-11the "www.example.*" wildcard hash supportIgor Sysoev1-41/+46
2007-06-06strstr() -> strchr()Igor Sysoev1-1/+1
2007-02-14ngx_strcasecmp()/ngx_strncasecmp()Igor Sysoev1-1/+1
2006-04-19nginx-0.3.40-RELEASE importrelease-0.3.40Igor Sysoev1-1/+1
*) Feature: the ngx_http_dav_module supports the MKCOL method. *) Feature: the "create_full_put_path" directive. *) Feature: the "$limit_rate" variable.
2006-04-07nginx-0.3.37-RELEASE importrelease-0.3.37Igor Sysoev1-1/+1
*) Feature: the "limit_except" directive. *) Feature: the "if" directive supports the "!~", "!~*", "-f", and "!-f" operators. *) Feature: the ngx_http_perl_module supports the $r->request_body method. *) Bugfix: in the ngx_http_addition_filter_module.
2006-02-16nginx-0.3.28-RELEASE importrelease-0.3.28Igor Sysoev1-0/+1
*) Feature: the "restrict_host_names" directive was canceled. *) Feature: the --with-cpu-opt=ppc64 configuration parameter. *) Bugfix: on some condition the proxied connection with a client was terminated prematurely. Thanks to Vladimir Shutoff. *) Bugfix: the "X-Accel-Limit-Rate" header line was not taken into account if the request was redirected using the "X-Accel-Redirect" header line. *) Bugfix: the "post_action" directive ran only after a successful completion of a request. *) Bugfix: the proxied response body generated by the "post_action" directive was transferred to a client.
2006-02-08nginx-0.3.27-RELEASE importrelease-0.3.27Igor Sysoev1-0/+2
*) Change: the "variables_hash_max_size" and "variables_hash_bucket_size" directives. *) Feature: the $body_bytes_sent variable can be used not only in the "log_format" directive. *) Feature: the $ssl_protocol and $ssl_cipher variables. *) Feature: the cache line size detection for widespread CPUs at start time. *) Feature: now the "accept_mutex" directive is supported using fcntl(2) on platforms different from i386, amd64, sparc64, and ppc. *) Feature: the "lock_file" directive and the --with-lock-path=PATH autoconfiguration directive. *) Bugfix: if the HTTPS protocol was used in the "proxy_pass" directive then the requests with the body was not transferred.
2006-01-24nginx-0.3.23-RELEASE importrelease-0.3.23Igor Sysoev1-0/+10
*) Feature: the "optimize_host_names" directive. *) Bugfix: in using of the variables in the "path" and "alias" directives. *) Bugfix: the ngx_http_perl_module was incorrectly built on Linux and Solaris.
2006-01-17nginx-0.3.22-RELEASE importrelease-0.3.22Igor Sysoev1-5/+2
*) Feature: the ngx_http_perl_module supports the $r->args and $r->unescape methods. *) Feature: the method $r->query_string of ngx_http_perl_module was canceled. *) Bugfix: segmentation fault was occurred if the "none" or "blocked" values was specified in the "valid_referers" directive; the bug had appeared in 0.3.18.
2006-01-16nginx-0.3.21-RELEASE importrelease-0.3.21Igor Sysoev1-4/+0
*) Feature: the ngx_http_perl_module. *) Change: the "valid_referers" directive allows the referreres without URI part.
2005-12-28nginx-0.3.19-RELEASE importrelease-0.3.19Igor Sysoev1-35/+88
*) Feature: the "path" and "alias" directives support the variables. *) Change: now the "valid_referers" directive again checks the URI part. *) Bugfix: in SSI handling.
2005-12-26nginx-0.3.18-RELEASE importrelease-0.3.18Igor Sysoev1-91/+152
*) Feature: the "server_names" directive supports the ".domain.tld" names. *) Feature: the "server_names" directive uses the hash for the "*.domain.tld" names and more effective hash for usual names. *) Change: the "server_names_hash_max_size" and "server_names_hash_bucket_size" directives. *) Change: the "server_names_hash" and "server_names_hash_threshold" directives were canceled. *) Feature: the "valid_referers" directive uses the hash site names. *) Change: now the "valid_referers" directive checks the site names only without the URI part. *) Bugfix: some ".domain.tld" names incorrectly processed by the ngx_http_map_module. *) Bugfix: segmentation fault was occurred if configuration file did not exist; the bug had appeared in 0.3.12. *) Bugfix: on 64-bit platforms segmentation fault may occurred on start; the bug had appeared in 0.3.16.
2005-12-05nginx-0.3.13-RELEASE importrelease-0.3.13Igor Sysoev1-1/+2
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS. *) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and /dev/poll methods. *) Bugfix: in SSI handling. *) Bugfix: now Solaris sendfilev() is not used to transfer the client request body to FastCGI-server via the unix domain socket. *) Bugfix: the "auth_basic" directive did not disable the authorization; the bug had appeared in 0.3.11.
2005-11-15nginx-0.3.10-RELEASE importrelease-0.3.10Igor Sysoev1-0/+309
*) Change: the "valid_referers" directive and the "$invalid_referer" variable were moved to the new ngx_http_referer_module from the ngx_http_rewrite_module. *) Change: the "$apache_bytes_sent" variable name was changed to "$body_bytes_sent". *) Feature: the "$sent_http_..." variables. *) Feature: the "if" directive supports the "=" and "!=" operations. *) Feature: the "proxy_pass" directive supports the HTTPS protocol. *) Feature: the "proxy_set_body" directive. *) Feature: the "post_action" directive. *) Feature: the ngx_http_empty_gif_module. *) Feature: the "worker_cpu_affinity" directive for Linux. *) Bugfix: the "rewrite" directive did not unescape URI part in redirect, now it is unescaped except the %00-%25 and %7F-%FF characters. *) Bugfix: nginx could not be built by the icc 9.0 compiler. *) Bugfix: if the SSI was enabled for zero size static file, then the chunked response was encoded incorrectly.