Fixes FS#59837.

Signed-off-by: Lukas Fleischer <lfleisc...@archlinux.org>
---
 web/lib/pkgreqfuncs.inc.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php
index 774ebe7..b8be7e5 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."));
        }
-- 
2.21.0

Reply via email to