From 4b0bc2cf9724e3c9592c045349a38b426148e3b2 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sat, 13 Jun 2015 15:45:45 +0200 Subject: repo-add: Reject armored signatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pacman cannot handle armored signatures, so make repo-add error out if one is detected. Signed-off-by: Johannes Löthberg Signed-off-by: Allan McRae --- scripts/repo-add.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 7e242ce2..69993a90 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -364,6 +364,10 @@ db_write_entry() { # compute base64'd PGP signature if [[ -f "$pkgfile.sig" ]]; then + if grep -q 'BEGIN PGP SIGNATURE' "$pkgfile.sig"; then + error "$(gettext "Cannot use armored signatures for packages: %s")" "$pkgfile.sig" + return 1 + fi pgpsigsize=$(@SIZECMD@ -L "$pkgfile.sig") if (( pgpsigsize > 16384 )); then error "$(gettext "Invalid package signature file '%s'.")" "$pkgfile.sig" -- cgit v1.2.3-70-g09d2