From face5eeb31ff7c24475e89b1f4f5c5868ebc0a77 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 23 Dec 2019 15:20:39 +0100 Subject: [PATCH 1/2] increase maxfiles to 50, handle error when no file generated. --- process/accept-orders.py | 2 +- process/orders-accept | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/process/accept-orders.py b/process/accept-orders.py index 5a7124d43..7c22df8fc 100755 --- a/process/accept-orders.py +++ b/process/accept-orders.py @@ -52,7 +52,7 @@ hostname = socket.gethostname() orderbase = "orders.dir" sendmail = True # maximum number of reports per sender: -maxfiles = 30 +maxfiles = 50 # write headers to file? writeheaders = True # reject all html email? diff --git a/process/orders-accept b/process/orders-accept index dfadb3aea..b1e87eb1d 100755 --- a/process/orders-accept +++ b/process/orders-accept @@ -17,10 +17,13 @@ mkdir -p orders.dir cd orders.dir lockfile -r3 -l120 "$LOCKFILE" eval "$(python "$BIN/accept-orders.py" "$@")" -rm -f "$LOCKFILE" -filename=$(basename "$ACCEPT_FILE") -email="$ACCEPT_MAIL" -if [ -d "$ERESSEA/orders-php" ] +if [ -e "$ACCEPT_FILE" ] then - php "$ERESSEA/orders-php/cli.php" insert "$filename" "$lang" "$email" + rm -f "$LOCKFILE" + filename=$(basename "$ACCEPT_FILE") + email="$ACCEPT_MAIL" + if [ -d "$ERESSEA/orders-php" ] + then + php "$ERESSEA/orders-php/cli.php" insert "$filename" "$lang" "$email" + fi fi From 8bf8b68571a6141b9c7344fb0a998c1faea122cb Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 14 Mar 2020 11:57:29 +0100 Subject: [PATCH 2/2] make parse_token trim ignored characters like zero-width spaces. --- src/util/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/parser.c b/src/util/parser.c index e66e2b724..e0f6aeb67 100644 --- a/src/util/parser.c +++ b/src/util/parser.c @@ -223,6 +223,7 @@ char *parse_token(const char **str, char *lbuf, size_t buflen) } *cursor = '\0'; + unicode_utf8_trim(lbuf); *str = ctoken; return lbuf; }