summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-02-25 11:17:42 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-02-25 11:18:02 +0100
commit2e1ce869ec2445f489d7e0d1890289d6f12761aa (patch)
tree299e22c73624a81bc03d219dc6c35b63bf19547a /web/html
parent09d8128f99c2edc27dd81efc63e9b3c797603ca1 (diff)
downloadaur-2e1ce869ec2445f489d7e0d1890289d6f12761aa.tar.gz
aur-2e1ce869ec2445f489d7e0d1890289d6f12761aa.tar.xz
Reject blacklisted packages on initial submission only.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/pkgsubmit.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 17e1967a..246dc903 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -231,15 +231,6 @@ if ($_COOKIE["AURSID"]):
}
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);
if (can_submit_pkg($pkg_name, $_COOKIE["AURSID"])) {
@@ -254,6 +245,15 @@ if ($_COOKIE["AURSID"]):
} else {
$error = __( "You are not allowed to overwrite the %h%s%h package.", "<b>", $pkg_name, "</b>");
}
+
+ 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) {