From fe7e0f9654c1c18d508f65144bb6efd2b4013b04 Mon Sep 17 00:00:00 2001 From: orin Date: Fri, 1 Aug 2025 19:41:37 +0200 Subject: [PATCH] Sanitize percents --- get.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/get.php b/get.php index a433f96..ab08b4c 100644 --- a/get.php +++ b/get.php @@ -22,6 +22,8 @@ function createUupConvertPackage( $type = $esd ? 'esd' : 'wim'; + $winUrl = str_replace("%", "%%", $url); + $currDir = dirname(__FILE__).'/..'; $time = gmdate("Y-m-d H:i:s T", time()); @@ -134,7 +136,7 @@ echo. $downloadapp :DOWNLOAD_UUPS echo Retrieving aria2 script for the UUP set... -"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$url" +"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$winUrl" if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1 echo. @@ -368,6 +370,8 @@ CONFIG; //Create aria2 download package only function createAria2Package($url, $archiveName, $app = null) { + $winUrl = str_replace("%", "%%", $url); + $currDir = dirname(__FILE__).'/..'; $time = gmdate("Y-m-d H:i:s T", time()); @@ -448,7 +452,7 @@ echo. $downloadapp :DOWNLOAD_UUPS echo Retrieving aria2 script for the UUP set... -"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$url" +"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$winUrl" if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1 echo.