From 3b6a61481fa5a439e37f0f7ff2b3e76ea2566275 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Fri, 1 Nov 2019 21:34:56 -0700 Subject: [PATCH] Fix Azure deploy - Fix handling of special characters in the Azure deployment config by quoting the VPN parameters - Fixes #644. Thanks @turbozapekanka for the report! --- azure/README-zh.md | 2 ++ azure/README.md | 2 ++ azure/azuredeploy.json | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/azure/README-zh.md b/azure/README-zh.md index 19b8e41..de2943f 100644 --- a/azure/README-zh.md +++ b/azure/README-zh.md @@ -12,6 +12,8 @@ - Operating System Image (操作系统镜像,Debian 9 或 Ubuntu 16.04 LTS) - Virtual Machine Size (虚拟机大小,默认值: Standard_B1s) +**注:** \*不要\* 在值中使用这些字符: `\ " '` + 请单击以下按钮开始: diff --git a/azure/README.md b/azure/README.md index 2ad6bb7..d10c074 100644 --- a/azure/README.md +++ b/azure/README.md @@ -12,6 +12,8 @@ Customizable with the following options: - Operating System Image (Debian 9 or Ubuntu 16.04 LTS) - Virtual Machine Size (Default: Standard_B1s) +**Note:** DO NOT use these special characters within values: `\ " '` + Press this button to start: diff --git a/azure/azuredeploy.json b/azure/azuredeploy.json index 2f67031..ca7a755 100644 --- a/azure/azuredeploy.json +++ b/azure/azuredeploy.json @@ -47,6 +47,7 @@ } }, "variables": { + "quote": "'", "location": "[resourceGroup().location]", "vmName": "vpnserver", "virtualNetworkName": "vpnVnet", @@ -71,7 +72,7 @@ "version": "latest" }, "installScriptURL": "https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/azure/install.sh", - "installCommand": "[concat('sh install.sh ', parameters('preSharedKey'), ' ', parameters('username'), ' ', parameters('password'))]" + "installCommand": "[concat('sh install.sh ', variables('quote'), parameters('preSharedKey'), variables('quote'), ' ', variables('quote'), parameters('username'), variables('quote'), ' ', variables('quote'), parameters('password'), variables('quote'))]" }, "resources": [ {