hi,

update the authldap module that has resumed development upstream, and
issued several releases in the past week (and had a security audit)

cf https://github.com/kvspb/nginx-auth-ldap/releases#release-v1.0.0

the diff updates to 1.4.0, i don't use it on openbsd but i have heavy
usage on debian and it's been working fine.

technically we could use
https://github.com/kvspb/nginx-auth-ldap/releases/download/v1.4.0/nginx-auth-ldap-1.4.0.tar.gz
instead of the DIST_TUPLE but that's more in line with other modules..

Landry
? nginx-1.18.0.diff
? nginx-mjs.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/nginx/Makefile,v
diff -u -r1.219 Makefile
--- Makefile    23 Nov 2026 17:02:10 -0000      1.219
+++ Makefile    24 Nov 2026 10:15:26 -0000
@@ -22,6 +22,7 @@
 VERSION=       1.30.8
 DISTNAME=      nginx-${VERSION}
 CATEGORIES=    www
+REVISION-ldap_auth=    0
 
 PKGNAME-main=          ${DISTNAME}
 
@@ -33,7 +34,7 @@
        github FRiCKLE ngx_cache_purge 2.3 ngx_cache_purge \
        github leev ngx_http_geoip2_module 3.4 ngx_http_geoip2_module \
        github openresty headers-more-nginx-module v0.40 
headers-more-nginx-module \
-       github kvspb nginx-auth-ldap 83c059b73566c2ee9cbda920d91b66657cf120b7 
nginx-auth-ldap \
+       github kvspb nginx-auth-ldap v1.4.0 nginx-auth-ldap \
        github openresty lua-nginx-module v0.10.11 lua-nginx-module \
        github vision5 ngx_devel_kit v0.3.4 ngx_devel_kit \
        github wargio naxsi 7e867e20e282bd8cf6bbe99ff6207139422988f5 naxsi \
@@ -93,7 +94,7 @@
 WANTLIB-geoip2=                maxminddb
 WANTLIB-headers_more=
 WANTLIB-image_filter=  gd
-WANTLIB-ldap_auth=     ldap
+WANTLIB-ldap_auth=     ldap lber
 WANTLIB-lua=           ${MODLUA_WANTLIB} m pcre
 WANTLIB-mailproxy=
 WANTLIB-modsecurity=   modsecurity
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/nginx/distinfo,v
diff -u -r1.107 distinfo
--- distinfo    23 Nov 2026 17:02:10 -0000      1.107
+++ distinfo    24 Nov 2026 10:15:26 -0000
@@ -1,6 +1,6 @@
 SHA256 (FRiCKLE-ngx_cache_purge-2.3.tar.gz) = 
y31fIpGcYT8fAzQaGuuWCWUmkwLp6yNCXMqr0vXcu+w=
 SHA256 (arut-nginx-rtmp-module-v1.2.2.tar.gz) = 
B/Gbe//sXjV7uIIMY+UoHevUX1oubUaxY22SAsPgnXg=
-SHA256 (kvspb-nginx-auth-ldap-83c059b73566c2ee9cbda920d91b66657cf120b7.tar.gz) 
= aQxOW9sq4ZsP7nXNNW0YATRo20cmFrYJeloLvjRshGQ=
+SHA256 (kvspb-nginx-auth-ldap-v1.4.0.tar.gz) = 
Ys8l72vDAgXs5l0RwS+SVA7D0AG/j8k5/gCo/WnjRIw=
 SHA256 (leev-ngx_http_geoip2_module-3.4.tar.gz) = 
rXL8IzSNcVozCZSYRTH6ubNgbhYEgyNnN/mkppV9lFI=
 SHA256 
(libinjection-libinjection-b9fcaaf9e50e9492807b23ffcc6af46ee1f203b9.tar.gz) = 
CgAuESgzLBvJVgyd+sSv8+sWYk4CnlYDB5CHT+oKi+E=
 SHA256 (nginx-1.30.0-chroot.patch) = 
verI7zwpFLZwG4rOIswpPlZUB1if66TDGL3HN2/RUAU=
@@ -14,7 +14,7 @@
 SHA256 (wargio-naxsi-7e867e20e282bd8cf6bbe99ff6207139422988f5.tar.gz) = 
g6v++6NQgogCiypzwypxTzEwKT7WS4V544ZGs+IkiyI=
 SIZE (FRiCKLE-ngx_cache_purge-2.3.tar.gz) = 11717
 SIZE (arut-nginx-rtmp-module-v1.2.2.tar.gz) = 519934
-SIZE (kvspb-nginx-auth-ldap-83c059b73566c2ee9cbda920d91b66657cf120b7.tar.gz) = 
18542
+SIZE (kvspb-nginx-auth-ldap-v1.4.0.tar.gz) = 176235
 SIZE (leev-ngx_http_geoip2_module-3.4.tar.gz) = 8877
 SIZE 
(libinjection-libinjection-b9fcaaf9e50e9492807b23ffcc6af46ee1f203b9.tar.gz) = 
2218439
 SIZE (nginx-1.30.0-chroot.patch) = 8217
Index: patches/patch-nginx-auth-ldap_config
===================================================================
RCS file: patches/patch-nginx-auth-ldap_config
diff -N patches/patch-nginx-auth-ldap_config
--- patches/patch-nginx-auth-ldap_config        11 Mar 2022 20:10:10 -0000      
1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-Index: nginx-auth-ldap/config
---- nginx-auth-ldap/config.orig
-+++ nginx-auth-ldap/config
-@@ -3,6 +3,9 @@ ngx_addon_name=ngx_http_auth_ldap_module
- LDAP_REQUIRED_LIBS="-lldap"
- 
- case "$NGX_PLATFORM" in
-+    OpenBSD:*)
-+        LDAP_REQUIRED_LIBS="-L${LOCALBASE}/lib $LDAP_REQUIRED_LIBS"
-+    ;;
-     Darwin:*|FreeBSD:*|Linux:*|SunOS:*)
-         LDAP_REQUIRED_LIBS="$LDAP_REQUIRED_LIBS -llber"
-     ;;
Index: patches/patch-nginx-auth-ldap_ngx_http_auth_ldap_module_c
===================================================================
RCS file: patches/patch-nginx-auth-ldap_ngx_http_auth_ldap_module_c
diff -N patches/patch-nginx-auth-ldap_ngx_http_auth_ldap_module_c
--- patches/patch-nginx-auth-ldap_ngx_http_auth_ldap_module_c   11 Mar 2022 
20:10:10 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
-conn->sockaddr is NULL in ngx_http_auth_ldap_ssl_handshake_handler(),
-remove support for bare IPs with certs to workaround.
-
-Index: nginx-auth-ldap/ngx_http_auth_ldap_module.c
---- nginx-auth-ldap/ngx_http_auth_ldap_module.c.orig
-+++ nginx-auth-ldap/ngx_http_auth_ldap_module.c
-@@ -1337,23 +1337,12 @@ ngx_http_auth_ldap_ssl_handshake_handler(ngx_connectio
-           char *hostname = c->server->ludpp->lud_host;
-           addr_verified = X509_check_host(cert, hostname, 0, 0, 0);
- 
--          if (!addr_verified) { // domain not in cert? try IP
--            size_t len; // get IP length
--            if (conn->sockaddr->sa_family == 4) len = 4;
--            else if (conn->sockaddr->sa_family == 6) len = 16;
--            else { // very unlikely indeed
--              ngx_http_auth_ldap_close_connection(c);
--              return;
--            }
--            addr_verified = X509_check_ip(cert, (const unsigned 
char*)conn->sockaddr->sa_data, len, 0);
--          }
--
-           // Find anything fishy?
-           if ( !(cert && addr_verified && chain_verified == X509_V_OK) ) {
-             if (!addr_verified) {
-               ngx_log_error(NGX_LOG_ERR, c->log, 0,
-                 "http_auth_ldap: Remote side presented invalid SSL 
certificate: "
--                "does not match address (neither server's domain nor IP in 
certificate's CN or SAN)");
-+                "does not match address");
-                 fprintf(stderr, "DEBUG: SSL cert domain mismatch\n"); 
fflush(stderr);
-             } else {
-               ngx_log_error(NGX_LOG_ERR, c->log, 0,

Reply via email to