From 57da29fe22455437d6075a6959bc9a924c6a64e9 Mon Sep 17 00:00:00 2001 From: Ludovic <54670129+lbr38@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:25:31 +0100 Subject: [PATCH 1/2] patch --- www/controllers/Repo/Package.php | 1 - www/public/custom_errors/custom_404.html | 2 +- www/public/custom_errors/custom_413.html | 2 +- www/public/custom_errors/custom_50x.html | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/www/controllers/Repo/Package.php b/www/controllers/Repo/Package.php index 33f9db3b..b8d4b4e7 100644 --- a/www/controllers/Repo/Package.php +++ b/www/controllers/Repo/Package.php @@ -178,7 +178,6 @@ public function upload(int $snapId, $packages) * If there has been no error so far, then we can move the file to its final location */ if ($uploadError == 0 and file_exists($packageTmpName)) { - /** * Create the target dir */ diff --git a/www/public/custom_errors/custom_404.html b/www/public/custom_errors/custom_404.html index 60c0447e..a7fff54f 100644 --- a/www/public/custom_errors/custom_404.html +++ b/www/public/custom_errors/custom_404.html @@ -2,7 +2,7 @@ Page not found - +
diff --git a/www/public/custom_errors/custom_413.html b/www/public/custom_errors/custom_413.html index 080d9fa4..8eb472ee 100644 --- a/www/public/custom_errors/custom_413.html +++ b/www/public/custom_errors/custom_413.html @@ -2,7 +2,7 @@ Error - +
diff --git a/www/public/custom_errors/custom_50x.html b/www/public/custom_errors/custom_50x.html index 5cd1c5d2..eba2498c 100644 --- a/www/public/custom_errors/custom_50x.html +++ b/www/public/custom_errors/custom_50x.html @@ -2,7 +2,7 @@ Error - +
From 2192b94c13c2f047c72390cc2120a5b421d5cbf3 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 4 Nov 2023 10:48:44 +0900 Subject: [PATCH 2/2] changed the controllers/Repo/Mirror/Rpm.php to check /repodata/repomd.xml instead of the /repodata directory. Some RPM servers are configured to prohibit access to the directory itself --- www/controllers/Repo/Mirror/Rpm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/controllers/Repo/Mirror/Rpm.php b/www/controllers/Repo/Mirror/Rpm.php index 4263de13..46a73b61 100644 --- a/www/controllers/Repo/Mirror/Rpm.php +++ b/www/controllers/Repo/Mirror/Rpm.php @@ -530,7 +530,7 @@ public function mirror() */ foreach ($this->archUrls as $arch => $archUrls) { foreach ($archUrls as $url) { - if (!\Controllers\Common::urlFileExists($url . '/repodata', $this->sslCustomCertificate, $this->sslCustomPrivateKey)) { + if (!\Controllers\Common::urlFileExists($url . '/repodata/repomd.xml', $this->sslCustomCertificate, $this->sslCustomPrivateKey)) { // $this->logOutput(' - ' . $url . ' (unreachable or nothing here?)' . PHP_EOL); /**