volume upload: escape $1 in the rewrite rule
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bc997f1a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bc997f1a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bc997f1a Branch: refs/heads/volume-upload Commit: bc997f1acb41eebd851780a63a6147c252a62808 Parents: 5c4fd12 Author: Rajani Karuturi <rajanikarut...@gmail.com> Authored: Wed Feb 4 15:37:10 2015 +0530 Committer: Rajani Karuturi <rajanikarut...@gmail.com> Committed: Tue Feb 17 11:34:18 2015 +0530 ---------------------------------------------------------------------- systemvm/patches/debian/config/etc/init.d/cloud-early-config | 2 +- systemvm/scripts/config_ssl.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc997f1a/systemvm/patches/debian/config/etc/init.d/cloud-early-config ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index acd1172..0edd11e 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -1170,7 +1170,7 @@ setup_secstorage() { sed -i -e "s/<\/VirtualHost>/RewriteEngine On \n&/" $SSL_FILE sed -i -e "s/<\/VirtualHost>/RewriteCond %{HTTPS} =on \n&/" $SSL_FILE sed -i -e "s/<\/VirtualHost>/RewriteCond %{REQUEST_METHOD} =POST \n&/" $SSL_FILE - sed -i -e "s/<\/VirtualHost>/RewriteRule ^\/upload\/(.*) http:\/\/127.0.0.1:8210\/upload?uuid=$1 [P,L] \n&/" $SSL_FILE + sed -i -e "s/<\/VirtualHost>/RewriteRule ^\/upload\/(.*) http:\/\/127.0.0.1:8210\/upload?uuid=\$1 [P,L] \n&/" $SSL_FILE fi fi http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc997f1a/systemvm/scripts/config_ssl.sh ---------------------------------------------------------------------- diff --git a/systemvm/scripts/config_ssl.sh b/systemvm/scripts/config_ssl.sh index 2ef200e..8022b78 100755 --- a/systemvm/scripts/config_ssl.sh +++ b/systemvm/scripts/config_ssl.sh @@ -69,7 +69,7 @@ config_apache2_conf() { sed -i -e "s/<\/VirtualHost>/RewriteEngine On \n&/" $SSL_FILE sed -i -e "s/<\/VirtualHost>/RewriteCond %{HTTPS} =on \n&/" $SSL_FILE sed -i -e "s/<\/VirtualHost>/RewriteCond %{REQUEST_METHOD} =POST \n&/" $SSL_FILE - sed -i -e "s/<\/VirtualHost>/RewriteRule ^\/upload\/(.*) http:\/\/127.0.0.1:8210\/upload?uuid=$1 [P,L] \n&/" $SSL_FILE + sed -i -e "s/<\/VirtualHost>/RewriteRule ^\/upload\/(.*) http:\/\/127.0.0.1:8210\/upload?uuid=\$1 [P,L] \n&/" $SSL_FILE fi fi