mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Ignore merge target for non-merge requests
Fixes FS#59837. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
dd11321fa3
commit
69deea9f2f
1 changed files with 5 additions and 0 deletions
|
@ -127,6 +127,11 @@ function pkgreq_file($ids, $type, $merge_into, $comments) {
|
|||
return array(false, __("You must be logged in to file package requests."));
|
||||
}
|
||||
|
||||
/* Ignore merge target for non-merge requests. */
|
||||
if ($type !== 'merge') {
|
||||
$merge_into = '';
|
||||
}
|
||||
|
||||
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."));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue