mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Reject blacklisted packages on initial submission only.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
09d8128f99
commit
2e1ce869ec
1 changed files with 9 additions and 9 deletions
|
@ -230,15 +230,6 @@ if ($_COOKIE["AURSID"]):
|
||||||
$incoming_pkgdir = INCOMING_DIR . $pkg_name;
|
$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) {
|
if (!$error) {
|
||||||
# First, see if this package already exists, and if it can be overwritten
|
# First, see if this package already exists, and if it can be overwritten
|
||||||
$pkg_exists = package_exists($pkg_name);
|
$pkg_exists = package_exists($pkg_name);
|
||||||
|
@ -254,6 +245,15 @@ if ($_COOKIE["AURSID"]):
|
||||||
} else {
|
} else {
|
||||||
$error = __( "You are not allowed to overwrite the %h%s%h package.", "<b>", $pkg_name, "</b>");
|
$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) {
|
if (!$error) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue