Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-08 10:56:08 +0100
committerErich Eckner <git@eckner.net>2019-01-08 10:56:08 +0100
commit8a14cd102d13e4934ad2472fece84f5c025d1c5e (patch)
tree9fd1a2b04fca67d815c23e3e6315a4a328022044
parent0b30f13476b6b00d41063a9c907098d1ca6b1898 (diff)
packages/pkginfo.php: add redirect for wrong parameter order
-rw-r--r--packages/pkginfo.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index e3b8a2f..ef690ea 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -1,6 +1,12 @@
<?php
require_once "../init.php";
+if (($_GET['repo']=='i686') || ($_GET['repo']=='i486') || ($_GET['repo']=='any')) {
+ header('Location: /' . $_GET['repo'] . '/' . $_GET['arch'] . '/' . $_GET['pkgname'] . '/');
+ error_log('needed redirect URL: ' . $_SERVER['REQUEST_URI'] . ', HTTP_USER_AGENT: ' . $_SERVER['HTTP_USER_AGENT'] . ', HTTP_REFERER: ' . $_SERVER['HTTP_REFERER']);
+ die();
+}
+
require_once BASE . "/lib/helper.php";
require_once BASE . "/lib/mysql.php";
require_once BASE . "/lib/style.php";