From 4b2b8afb8aad83588cd9d0cf9af28acfb5d3bb74 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 21 Feb 2011 19:19:53 +0100 Subject: Reject packages with subdirectories (fixes FS#22995). Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'web/html') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index ccbd35e7..df7c4671 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -38,6 +38,9 @@ if ($_COOKIE["AURSID"]): $pkgbuild_raw = $tar->extractInString($tar_file['filename']); break; } + elseif (preg_match('/^[^\/]+\/[^\/]+\//', $tar_file['filename'])) { + $error = __("Error - source tarball may not contain subdirectories."); + } } if (empty($pkgbuild_raw)) { -- cgit v1.2.3-24-g4f1b