summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-12-03 00:57:48 +0100
committerConrad Kostecki <conikost@gentoo.org>2022-12-03 00:57:48 +0100
commite1542f080b666233bf679c899daec39fed3f0a4c (patch)
tree9345a1fb44cfe3f1c9c113de94b42e13e3ea02f6 /www-servers
parentmedia-gfx/darktable: make sys-devel/gcc[-graphite] error message more detailed (diff)
downloadgentoo-e1542f080b666233bf679c899daec39fed3f0a4c.tar.gz
gentoo-e1542f080b666233bf679c899daec39fed3f0a4c.tar.bz2
gentoo-e1542f080b666233bf679c899daec39fed3f0a4c.zip
www-servers/nginx: fix ldap crash
Closes: https://bugs.gentoo.org/883401 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch21
-rw-r--r--www-servers/nginx/nginx-1.23.2-r3.ebuild (renamed from www-servers/nginx/nginx-1.23.2-r2.ebuild)6
2 files changed, 27 insertions, 0 deletions
diff --git a/www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch b/www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch
new file mode 100644
index 000000000000..b3b4cf4b33c4
--- /dev/null
+++ b/www-servers/nginx/files/nginx-1.23.2-mod_auth_ldap-fix.patch
@@ -0,0 +1,21 @@
+From f0a5f61d9aad59c23e2c877094a8f17c43bee5b5 Mon Sep 17 00:00:00 2001
+From: freultwah <631910+freultwah@users.noreply.github.com>
+Date: Tue, 23 Aug 2022 18:09:45 +0300
+Subject: [PATCH] Make the module not crash with nginx >1.23.*
+
+---
+ ngx_http_auth_ldap_module.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c
+index 2f4e592..83b481c 100644
+--- a/ngx_http_auth_ldap_module.c
++++ b/ngx_http_auth_ldap_module.c
+@@ -1779,6 +1779,7 @@ ngx_http_auth_ldap_set_realm(ngx_http_request_t *r, ngx_str_t *realm)
+ }
+
+ r->headers_out.www_authenticate->hash = 1;
++ r->headers_out.www_authenticate->next = NULL;
+ r->headers_out.www_authenticate->key.len = sizeof("WWW-Authenticate") - 1;
+ r->headers_out.www_authenticate->key.data = (u_char *) "WWW-Authenticate";
+ r->headers_out.www_authenticate->value = *realm;
diff --git a/www-servers/nginx/nginx-1.23.2-r2.ebuild b/www-servers/nginx/nginx-1.23.2-r3.ebuild
index 96915733beb5..4b707c551371 100644
--- a/www-servers/nginx/nginx-1.23.2-r2.ebuild
+++ b/www-servers/nginx/nginx-1.23.2-r3.ebuild
@@ -377,6 +377,12 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch"
+ if use nginx_modules_http_auth_ldap; then
+ cd "${HTTP_LDAP_MODULE_WD}" || die
+ eapply "${FILESDIR}/${PN}-1.23.2-mod_auth_ldap-fix.patch"
+ cd "${S}" || die
+ fi
+
if use nginx_modules_http_sticky; then
cd "${HTTP_STICKY_MODULE_WD}" || die
eapply "${FILESDIR}"/http_sticky-nginx-1.23.0.patch