From be213ab7c526cb6a6809b8dc3516363d6589d48e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 13 Apr 2014 12:44:18 +0200 Subject: [PATCH] Validate agent bundle files. Refs #6002 --- pki/icinga2-setup-agent.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pki/icinga2-setup-agent.cmake b/pki/icinga2-setup-agent.cmake index ff9b04b8c..ed4aa2876 100644 --- a/pki/icinga2-setup-agent.cmake +++ b/pki/icinga2-setup-agent.cmake @@ -14,6 +14,11 @@ if [ -n "$1" ]; then exit 1 fi + if ! base64 -d $1 2>/dev/null; then + echo "The bundle file is invalid or corrupted." + exit 1 + fi + while true; do echo -n "Are you setting up a new master instance? [n] " if ! read master; then