From d3bb616ddd7d97455919dcd49e132f8d271bf38b Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 28 Jul 2010 02:42:52 -0700 Subject: Bugfix 5711: Don't allow special characters in image names. --- scripts/install/install-image-new | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/install/install-image-new') diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index 5726fa03..c669da8e 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -33,6 +33,11 @@ fi echo -n "What would you like to name this image? [$image_name]: " read response if [ -n "$response" ]; then + badchars=`echo $response | sed -e 's/[a-zA-Z0-9\.\_+-]//g'` + if [ -n "$badchars" ]; then + echo "Image name must be composed of a-z, A-Z, 0-9, or one of ._+-" + exit 1 + fi image_name=$response fi -- cgit v1.2.3