mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Verify that the target of merge operations exists
Make sure that the target of a merge operation is either empty or an existing package base name. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
68abf41b94
commit
ed1e747847
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,10 @@ function pkgreq_file($ids, $type, $merge_into, $comments) {
|
|||
return array(false, __("Invalid name: only lowercase letters are allowed."));
|
||||
}
|
||||
|
||||
if (!empty($merge_into) && !pkgbase_from_name($merge_into)) {
|
||||
return array(false, __("Cannot find package to merge votes and comments into."));
|
||||
}
|
||||
|
||||
if (empty($comments)) {
|
||||
return array(false, __("The comment field must not be empty."));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue