From 15dc01adf467a41b7a7d6047b538ebf2f1563946 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Tue, 3 Dec 2024 22:28:07 +0100 Subject: [PATCH 1/2] net/haproxy: bump version --- net/haproxy/Makefile | 3 +-- net/haproxy/pkg-descr | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 887d00cd8..81ea69ec0 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -1,6 +1,5 @@ PLUGIN_NAME= haproxy -PLUGIN_VERSION= 4.3 -PLUGIN_REVISION= 2 +PLUGIN_VERSION= 4.4 PLUGIN_COMMENT= Reliable, high performance TCP/HTTP load balancer PLUGIN_DEPENDS= haproxy28 py${PLUGIN_PYTHON}-haproxy-cli PLUGIN_MAINTAINER= opnsense@moov.de diff --git a/net/haproxy/pkg-descr b/net/haproxy/pkg-descr index 4f59e884f..b9017c96b 100644 --- a/net/haproxy/pkg-descr +++ b/net/haproxy/pkg-descr @@ -6,6 +6,11 @@ very high loads while needing persistence or Layer7 processing. Plugin Changelog ================ +4.4 + +Fixed: +* Cron job "Sync SSL certificate changes" not working (#4035) + 4.3 Added: From 327dd52f985e7e0dc5711d6c29198436d84e80db Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Tue, 3 Dec 2024 22:55:49 +0100 Subject: [PATCH 2/2] net/haproxy: show warning if group has no members, fixes #3364 --- net/haproxy/pkg-descr | 1 + .../templates/OPNsense/HAProxy/haproxy.conf | 31 +++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/net/haproxy/pkg-descr b/net/haproxy/pkg-descr index b9017c96b..d3e0b934f 100644 --- a/net/haproxy/pkg-descr +++ b/net/haproxy/pkg-descr @@ -10,6 +10,7 @@ Plugin Changelog Fixed: * Cron job "Sync SSL certificate changes" not working (#4035) +* Template error with empty user group (#3364) 4.3 diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index 679ab09db..3e40f63c0 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -886,22 +886,27 @@ {% if group_data == {} %} # WARNING: group data not found ({{group}}) {% else %} -{# # extract user list from group object #} -{% for user in group_data.members.split(",") %} -{% set user_data = helpers.getUUID(user) %} -{% if user_data.name in users_seen %} +{# # check if group has any member #} +{% if group_data.members is defined %} +{# # extract user list from group object #} +{% for user in group_data.members.split(",") %} +{% set user_data = helpers.getUUID(user) %} +{% if user_data.name in users_seen %} # WARNING: skipping duplicate username ({{user_data.name}}) -{% else %} -{% do users_seen.append(user_data.name) %} -{# # check if using an encrypted password #} -{% if user_data.password|default("")|truncate(1, False, '', 0) == '$' %} -{% set user_pwsec = 'password' %} {% else %} -{% set user_pwsec = 'insecure-password' %} -{% endif %} +{% do users_seen.append(user_data.name) %} +{# # check if using an encrypted password #} +{% if user_data.password|default("")|truncate(1, False, '', 0) == '$' %} +{% set user_pwsec = 'password' %} +{% else %} +{% set user_pwsec = 'insecure-password' %} +{% endif %} user {{user_data.name}} {{user_pwsec}} {{user_data.password}} -{% endif %} -{% endfor %} +{% endif %} +{% endfor %} +{% else %} + # WARNING: ignoring group with no members ({{group_data.name}}) +{% endif %} {% endif %} {% endfor %} {% else %}