From e06cd4458486fcf274a5ceb404b2f74d67544a4d Mon Sep 17 00:00:00 2001 From: MickLesk Date: Tue, 6 Jan 2026 20:10:34 +0100 Subject: [PATCH] --- install/papra-install.sh | 3 +-- misc/tools.func | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install/papra-install.sh b/install/papra-install.sh index d17db0a3b..bd6376f27 100644 --- a/install/papra-install.sh +++ b/install/papra-install.sh @@ -23,8 +23,7 @@ msg_ok "Installed Dependencies" NODE_VERSION="24" setup_nodejs RELEASE=$(curl -fsSL https://api.github.com/repos/papra-hq/papra/releases | grep -oP '"tag_name":\s*"\K@papra/docker@[^"]+' | head -n1) -RELEASE_ENCODED=$(printf '%s' "$RELEASE" | jq -sRr @uri) -fetch_and_deploy_gh_release "papra" "papra-hq/papra" "tarball" "${RELEASE_ENCODED}" "/opt/papra" +fetch_and_deploy_gh_release "papra" "papra-hq/papra" "tarball" "${RELEASE}" "/opt/papra" msg_info "Setup Papra" cd /opt/papra diff --git a/misc/tools.func b/misc/tools.func index f7c13fa7c..4538f067c 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -1759,7 +1759,10 @@ function fetch_and_deploy_gh_release() { if [[ "$mode" == "tarball" || "$mode" == "source" ]]; then # GitHub API's tarball_url/zipball_url can return HTTP 300 Multiple Choices # when a branch and tag share the same name. Use explicit refs/tags/ URL instead. - local direct_tarball_url="https://github.com/$repo/archive/refs/tags/$tag_name.tar.gz" + # URL-encode the tag_name for special characters (e.g., @papra/docker@25.12.0) + local tag_encoded + tag_encoded=$(printf '%s' "$tag_name" | jq -sRr @uri) + local direct_tarball_url="https://github.com/$repo/archive/refs/tags/$tag_encoded.tar.gz" filename="${app_lc}-${version}.tar.gz" curl $download_timeout -fsSL -o "$tmpdir/$filename" "$direct_tarball_url" || {