From 5f71570ec48588bf24bfe786f40b500216084d07 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 13 Apr 2012 15:40:30 -0400 Subject: makepkg: restrict allowed characters in pkgname Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index eeb7ede1..6990572b 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1454,6 +1454,11 @@ check_sanity() { error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname" ret=1 fi + if [[ $i = *[^[:alnum:]+_.@-]* ]]; then + error "$(gettext "%s contains invalid characters: '%s'")" \ + 'pkgname' "${pkgname//[[:alnum:]+_.@-]}" + ret=1 + fi done if [[ ${pkgbase:0:1} = "-" ]]; then -- cgit v1.2.3-24-g4f1b