diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-08-11 22:50:01 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-08-11 22:50:01 +0200 |
commit | 49f76cd53bea8f42992b447cb19117a55479e08e (patch) | |
tree | 61e0c1fc89d523daffae0782f5fecdb5ac3c9587 /web/lib/pkgreqfuncs.inc.php | |
parent | 4d7da95906f66a10368f8689b6686199753268b9 (diff) | |
parent | 218ccf51e38ad9b0654aa509f2bf8eec44d69c07 (diff) | |
download | aur-49f76cd53bea8f42992b447cb19117a55479e08e.tar.gz aur-49f76cd53bea8f42992b447cb19117a55479e08e.tar.xz |
Merge branch 'maint'
Diffstat (limited to 'web/lib/pkgreqfuncs.inc.php')
-rw-r--r-- | web/lib/pkgreqfuncs.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index 5924959a..92070434 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -91,7 +91,11 @@ function pkgreq_file($ids, $type, $merge_into, $comments) { global $AUR_REQUEST_ML; global $AUTO_ORPHAN_AGE; - if (!empty($merge_into) && !preg_match("/^[a-z0-9][a-z0-9\.+_-]*$/", $merge_into)) { + if (!has_credential(CRED_PKGREQ_FILE)) { + return array(false, __("You must be logged in to file package requests.")); + } + + if (!empty($merge_into) && !preg_match("/^[a-z0-9][a-z0-9\.+_-]*$/D", $merge_into)) { return array(false, __("Invalid name: only lowercase letters are allowed.")); } |