Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r5018 - trunk/src/http/modules

Anonymous User
January 28, 2013 09:44AM
Author: ru
Date: 2013-01-28 14:42:07 +0000 (Mon, 28 Jan 2013)
New Revision: 5018
URL: http://trac.nginx.org/nginx/changeset/5018/nginx

Log:
Secure_link: fixed configuration inheritance.

The "secure_link_secret" directive was always inherited from the outer
configuration level even when "secure_link" and "secure_link_md5" were
specified on the inner level.


Modified:
trunk/src/http/modules/ngx_http_secure_link_module.c

Modified: trunk/src/http/modules/ngx_http_secure_link_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_secure_link_module.c 2013-01-25 09:59:28 UTC (rev 5017)
+++ trunk/src/http/modules/ngx_http_secure_link_module.c 2013-01-28 14:42:07 UTC (rev 5018)
@@ -111,7 +111,7 @@

conf = ngx_http_get_module_loc_conf(r, ngx_http_secure_link_module);

- if (conf->secret.len) {
+ if (conf->secret.data) {
return ngx_http_secure_link_old_variable(r, conf, v, data);
}

@@ -318,8 +318,17 @@
ngx_http_secure_link_conf_t *prev = parent;
ngx_http_secure_link_conf_t *conf = child;

- ngx_conf_merge_str_value(conf->secret, prev->secret, "");
+ if (conf->secret.data) {
+ if (conf->variable || conf->md5) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "\"secure_link_secret\" cannot be mixed with "
+ "\"secure_link\" and \"secure_link_md5\"");
+ return NGX_CONF_ERROR;
+ }

+ return NGX_CONF_OK;
+ }
+
if (conf->variable == NULL) {
conf->variable = prev->variable;
}
@@ -328,6 +337,10 @@
conf->md5 = prev->md5;
}

+ if (conf->variable == NULL && conf->md5 == NULL) {
+ conf->secret = prev->secret;
+ }
+
return NGX_CONF_OK;
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r5018 - trunk/src/http/modules

Anonymous User 844 January 28, 2013 09:44AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 192
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