From: Paul Hänsch Date: Tue, 14 May 2024 10:18:09 +0000 (+0200) Subject: use new RXLITERAL function for regex escape (fixes bug wih faulty sed script) X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d14d401866b98c58cadfce23e2dd116ef13afd55;p=shellwiki use new RXLITERAL function for regex escape (fixes bug wih faulty sed script) --- diff --git a/auth/default.sh b/auth/default.sh index 02778db..feaac97 100644 --- a/auth/default.sh +++ b/auth/default.sh @@ -1,10 +1,10 @@ #!/bin/sh . "$_EXEC/cgilite/users.sh" +. "$_EXEC/cgilite/storage.sh" GROUP_BASE="${GROUP_BASE:-/[wiki]/}" - -rgx_uname="$(printf '%s' "$USER_NAME" |sed 's;[.*+?^${}()|[\]\\];\\&;g')" +rgx_uname="$(RXLITERAL "$USER_NAME")" USER_GROUPS="$( grep -lE '^[\t ]*[-+*][\t ]+'"${rgx_uname}${CR}"'?$' "$_DATA/pages${GROUP_BASE%/}/&"*"/#page.md" \