From 2e1ce869ec2445f489d7e0d1890289d6f12761aa Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 25 Feb 2011 11:17:42 +0100 Subject: Reject blacklisted packages on initial submission only. Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 17e1967..246dc90 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -230,15 +230,6 @@ if ($_COOKIE["AURSID"]): $incoming_pkgdir = INCOMING_DIR . $pkg_name; } - if (!$error) { - # Check if package name is blacklisted. - if (pkgname_is_blacklisted($pkg_name)) { - if (!canSubmitBlacklisted(account_from_sid($_COOKIE["AURSID"]))) { - $error = __( "%s is on the package blacklist, please check if it's available in the official repos.", $pkg_name); - } - } - } - if (!$error) { # First, see if this package already exists, and if it can be overwritten $pkg_exists = package_exists($pkg_name); @@ -254,6 +245,15 @@ if ($_COOKIE["AURSID"]): } else { $error = __( "You are not allowed to overwrite the %h%s%h package.", "", $pkg_name, ""); } + + if (!$error) { + # Check if package name is blacklisted. + if (!$pkg_exists && pkgname_is_blacklisted($pkg_name)) { + if (!canSubmitBlacklisted(account_from_sid($_COOKIE["AURSID"]))) { + $error = __( "%s is on the package blacklist, please check if it's available in the official repos.", $pkg_name); + } + } + } } if (!$error) { -- cgit v1.2.3-54-g00ecf