mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
pkgsubmit.php: Check that there is one directory in a tarball
Users are able to upload tarballs without a directory. The directory count for a tarball is available, so use it to display an error when there is not a single directory. This patch has no effect on users who generate their uploaded tarballs using makepkg. All other users must include a directory in their tarball. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
985a2ed49c
commit
9fd4845d16
1 changed files with 4 additions and 0 deletions
|
@ -106,6 +106,10 @@ if ($uid):
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error && $dircount !== 1) {
|
||||
$error = __("Error - source tarball may not contain files outside a directory.");
|
||||
}
|
||||
|
||||
if (!$error && empty($pkgbuild_raw)) {
|
||||
$error = __("Error trying to unpack upload - PKGBUILD does not exist.");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue