diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-07-28 02:42:52 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-07-28 02:42:52 -0700 |
commit | d3bb616ddd7d97455919dcd49e132f8d271bf38b (patch) | |
tree | 28269d97c14facc20b9787712e609f00e55bc9ec /scripts/install/install-image-new | |
parent | 5728249e7176331e00f82a323f65b62975c752c6 (diff) | |
download | vyatta-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-x | scripts/install/install-image-new | 5 |
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 |