mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-10-06 00:03:39 -04:00
[Postfix] Sanitize string in smtpd last login script with printf
This commit is contained in:
parent
4e337b308f
commit
9245bd8636
@ -16,7 +16,8 @@ while read QUERY; do
|
||||
echo -ne "action=dunno\n\n"
|
||||
# We found a username, log and return
|
||||
elif [[ "${QUERY[0]}" =~ sasl_username ]]; then
|
||||
${REDIS_CMDLINE} SET "last-login/smtp/$(echo ${QUERY[0]#sasl_username=})" "$(date +%s)"
|
||||
MUSER=$(printf "%q" ${QUERY[0]#sasl_username=})
|
||||
${REDIS_CMDLINE} SET "last-login/smtp/$MUSER" "$(date +%s)"
|
||||
echo -ne "action=dunno\n\n"
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user