summaryrefslogtreecommitdiff
path: root/scripts/install/install-image-new
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2010-07-28 02:42:52 -0700
committerBob Gilligan <gilligan@vyatta.com>2010-07-28 02:42:52 -0700
commitd3bb616ddd7d97455919dcd49e132f8d271bf38b (patch)
tree28269d97c14facc20b9787712e609f00e55bc9ec /scripts/install/install-image-new
parent5728249e7176331e00f82a323f65b62975c752c6 (diff)
downloadvyatta-cfg-quagga-d3bb616ddd7d97455919dcd49e132f8d271bf38b.tar.gz
vyatta-cfg-quagga-d3bb616ddd7d97455919dcd49e132f8d271bf38b.zip
Bugfix 5711: Don't allow special characters in image names.
Diffstat (limited to 'scripts/install/install-image-new')
-rwxr-xr-xscripts/install/install-image-new5
1 files changed, 5 insertions, 0 deletions
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