summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2019-05-24 18:24:46 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2019-05-24 18:24:46 +0200
commit69deea9f2f7bb47a44b70ec1b4b3615778313c9a (patch)
treea0d0ac2e266cfd1cfc956b34623cdfeef7e13ac2 /web
parentdd11321fa362b357cdd12039ae11ec19c3d72fae (diff)
downloadaur-69deea9f2f7bb47a44b70ec1b4b3615778313c9a.tar.gz
aur-69deea9f2f7bb47a44b70ec1b4b3615778313c9a.tar.xz
Ignore merge target for non-merge requests
Fixes FS#59837. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web')
-rw-r--r--web/lib/pkgreqfuncs.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php
index 774ebe7e..b8be7e54 100644
--- a/web/lib/pkgreqfuncs.inc.php
+++ b/web/lib/pkgreqfuncs.inc.php
@@ -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."));
}