From 2c3d08eaef56a3d5ed958093c42c77feafeeaad9 Mon Sep 17 00:00:00 2001 From: Johannes Westhuis Date: Fri, 5 Dec 2025 14:38:10 +0100 Subject: [PATCH] nginx parser fails on commented lines on lines like ssl_prefer_server_ciphers on; # Force server cipher order. the result of the parser would keep the ';', returning 'on;' which in turn would lead to a mismatch of "on" != "on;" This was caused by an incorrect order of the sed statements. Now first the comment is removed and afterwards the trailing ; gets removed. --- include/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions b/include/functions index bc44aff1..81b8408f 100644 --- a/include/functions +++ b/include/functions @@ -2247,7 +2247,7 @@ FIND=$(sed 's/ /:space:/g' ${TMP_NGINX_FILE}) DEPTH=0 for I in ${FIND}; do - I=$(echo ${I} | sed 's/:space:/ /g' | sed 's/;$//' | sed 's/ #.*$//') + I=$(echo ${I} | sed 's/:space:/ /g' | sed 's/ #.*$//' | sed 's/;$//') OPTION=$(echo ${I} | awk '{ print $1 }') # Use quotes here to prevent wildcard expansion VALUE=$(echo "${I}"| cut -d' ' -f2-)