From 8834a65e4cfa0944422dd2af2323d571b2e03dbb Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 10 Jan 2024 11:00:08 -0500 Subject: [PATCH] Address case where user is already arsse --- CHANGELOG | 4 ++-- RoboFile.php | 2 +- dist/arch/arsse | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 677620b5..40c75c2d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Version 0.10.5 (2024-01-09) +Version 0.10.5 (2024-01-10) =========================== Changes: @@ -81,7 +81,7 @@ Bug fixes: - Further relax Fever HTTP correctness, to fix more clients - Use icons specified in Atom feeds when available - Do not return null as subscription unread count -- Explicitly forbid U+003A COLON and control characters in usernames, for +- Explicitly forbid U+003A COLON and control characters in usernames, for compatibility with RFC 7617 - Never return 401 in response to an OPTIONS request - Accept "t" and "f" as booleans in Tiny Tiny RSS diff --git a/RoboFile.php b/RoboFile.php index c83be4eb..5d02aa21 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -517,7 +517,7 @@ class RoboFile extends \Robo\Tasks { } elseif (in_array("item", $expected) && preg_match('/^- (\w.*)$/D', $l, $m)) { $entry[$section][] = $m[1]; $expected = ["item", "continuation", "blank line"]; - } elseif (in_array("continuation", $expected) && preg_match('/^ (\w.*)$/D', $l, $m)) { + } elseif (in_array("continuation", $expected) && preg_match('/^ (\S.*)$/D', $l, $m)) { $last = sizeof($entry[$section]) - 1; $entry[$section][$last] .= "\n".$m[1]; } else { diff --git a/dist/arch/arsse b/dist/arch/arsse index 0ccc645a..c099a569 100644 --- a/dist/arch/arsse +++ b/dist/arch/arsse @@ -11,13 +11,15 @@ check_sudo() { } # allow overriding the php executable -if [[ -n "${ARSSE_PHP}" ]] && command -v "${ARSSE_PHP}" > /dev/null; then +if [ -n "${ARSSE_PHP}" ] && command -v "${ARSSE_PHP}" > /dev/null; then php="${ARSSE_PHP}" else php="${default_php}" fi -if [[ "${UID}" -eq 0 ]]; then +if [ "$(whoami)" = "arsse" ]; then + "$php" /usr/share/webapps/arsse/arsse "$@" +elif [ "${UID}" -eq 0 ]; then runuser -u "arsse" -- "$php" /usr/share/webapps/arsse/arsse "$@" else check_sudo