diff options
-rw-r--r-- | www/nginx-devel/Makefile | 1 | ||||
-rw-r--r-- | www/nginx-devel/files/extra-patch-ngx_http_auth_digest_module.c | 30 | ||||
-rw-r--r-- | www/nginx/Makefile | 1 | ||||
-rw-r--r-- | www/nginx/files/extra-patch-ngx_http_auth_digest_module.c | 30 |
4 files changed, 62 insertions, 0 deletions
diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index 00df99efb15a..41f928497bf4 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -293,6 +293,7 @@ GH_ACCOUNT+= samizdatco:auth_digest GH_PROJECT+= nginx-http-auth-digest:auth_digest GH_TAGNAME+= ${GIT_AUTH_DIGEST_VERSION}:auth_digest CONFIGURE_ARGS+=--add-module=${WRKSRC_auth_digest} +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_auth_digest_module.c .endif .if ${PORT_OPTIONS:MHTTP_AUTH_LDAP} diff --git a/www/nginx-devel/files/extra-patch-ngx_http_auth_digest_module.c b/www/nginx-devel/files/extra-patch-ngx_http_auth_digest_module.c new file mode 100644 index 000000000000..0b98a0e67fa4 --- /dev/null +++ b/www/nginx-devel/files/extra-patch-ngx_http_auth_digest_module.c @@ -0,0 +1,30 @@ +--- ../nginx-http-auth-digest-bd1c86a/ngx_http_auth_digest_module.c.orig 2011-12-29 04:00:32.000000000 +0400 ++++ ../nginx-http-auth-digest-bd1c86a/ngx_http_auth_digest_module.c 2015-06-13 20:18:59.856347000 +0300 +@@ -403,11 +403,11 @@ + if (http_method.data==NULL) return NGX_HTTP_INTERNAL_SERVER_ERROR; + p = ngx_cpymem(http_method.data, r->method_name.data, r->method_end - r->method_name.data+1); + +- ha2_key.len = http_method.len + r->uri.len + 1; ++ ha2_key.len = http_method.len + r->unparsed_uri.len + 1; + ha2_key.data = ngx_pcalloc(r->pool, ha2_key.len); + if (ha2_key.data==NULL) return NGX_HTTP_INTERNAL_SERVER_ERROR; + p = ngx_cpymem(ha2_key.data, http_method.data, http_method.len-1); *p++ = ':'; +- p = ngx_cpymem(p, r->uri.data, r->uri.len); ++ p = ngx_cpymem(p, r->unparsed_uri.data, r->unparsed_uri.len); + + HA2.len = 33; + HA2.data = ngx_pcalloc(r->pool, HA2.len); +@@ -487,11 +487,11 @@ + // recalculate the digest with a modified HA2 value (for rspauth) and emit the + // Authentication-Info header + ngx_memset(ha2_key.data, 0, ha2_key.len); +- p = ngx_sprintf(ha2_key.data, ":%s", r->uri.data); ++ p = ngx_sprintf(ha2_key.data, ":%s", r->unparsed_uri.data); + + ngx_memset(HA2.data, 0, HA2.len); + ngx_md5_init(&md5); +- ngx_md5_update(&md5, ha2_key.data, r->uri.len); ++ ngx_md5_update(&md5, ha2_key.data, r->unparsed_uri.len); + ngx_md5_final(hash, &md5); + ngx_hex_dump(HA2.data, hash, 16); + diff --git a/www/nginx/Makefile b/www/nginx/Makefile index b4fbfdea21aa..063b0dc777fd 100644 --- a/www/nginx/Makefile +++ b/www/nginx/Makefile @@ -290,6 +290,7 @@ GH_ACCOUNT+= samizdatco:auth_digest GH_PROJECT+= nginx-http-auth-digest:auth_digest GH_TAGNAME+= ${GIT_AUTH_DIGEST_VERSION}:auth_digest CONFIGURE_ARGS+=--add-module=${WRKSRC_auth_digest} +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_auth_digest_module.c .endif .if ${PORT_OPTIONS:MHTTP_AUTH_LDAP} diff --git a/www/nginx/files/extra-patch-ngx_http_auth_digest_module.c b/www/nginx/files/extra-patch-ngx_http_auth_digest_module.c new file mode 100644 index 000000000000..0b98a0e67fa4 --- /dev/null +++ b/www/nginx/files/extra-patch-ngx_http_auth_digest_module.c @@ -0,0 +1,30 @@ +--- ../nginx-http-auth-digest-bd1c86a/ngx_http_auth_digest_module.c.orig 2011-12-29 04:00:32.000000000 +0400 ++++ ../nginx-http-auth-digest-bd1c86a/ngx_http_auth_digest_module.c 2015-06-13 20:18:59.856347000 +0300 +@@ -403,11 +403,11 @@ + if (http_method.data==NULL) return NGX_HTTP_INTERNAL_SERVER_ERROR; + p = ngx_cpymem(http_method.data, r->method_name.data, r->method_end - r->method_name.data+1); + +- ha2_key.len = http_method.len + r->uri.len + 1; ++ ha2_key.len = http_method.len + r->unparsed_uri.len + 1; + ha2_key.data = ngx_pcalloc(r->pool, ha2_key.len); + if (ha2_key.data==NULL) return NGX_HTTP_INTERNAL_SERVER_ERROR; + p = ngx_cpymem(ha2_key.data, http_method.data, http_method.len-1); *p++ = ':'; +- p = ngx_cpymem(p, r->uri.data, r->uri.len); ++ p = ngx_cpymem(p, r->unparsed_uri.data, r->unparsed_uri.len); + + HA2.len = 33; + HA2.data = ngx_pcalloc(r->pool, HA2.len); +@@ -487,11 +487,11 @@ + // recalculate the digest with a modified HA2 value (for rspauth) and emit the + // Authentication-Info header + ngx_memset(ha2_key.data, 0, ha2_key.len); +- p = ngx_sprintf(ha2_key.data, ":%s", r->uri.data); ++ p = ngx_sprintf(ha2_key.data, ":%s", r->unparsed_uri.data); + + ngx_memset(HA2.data, 0, HA2.len); + ngx_md5_init(&md5); +- ngx_md5_update(&md5, ha2_key.data, r->uri.len); ++ ngx_md5_update(&md5, ha2_key.data, r->unparsed_uri.len); + ngx_md5_final(hash, &md5); + ngx_hex_dump(HA2.data, hash, 16); + |