Skip to content

Commit fb7e2ff

Browse files
issacnitinmsftmrdavidkendallken407
authored
allow passwords starting with a hyphen (#12909) (#13019)
* allow passwords starting with a hyphen * updates AzureCLIV1 per review comments. Co-authored-by: David Kendall <[email protected]> Co-authored-by: Nitin Issac Joy <[email protected]> Co-authored-by: David Kendall <[email protected]> Co-authored-by: David Kendall <[email protected]>
1 parent fb65e9d commit fb7e2ff

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

Tasks/AzureCLIV1/azureclitask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class azureclitask {
147147
let escapedCliPassword = cliPassword.replace(/"/g, '\\"');
148148
tl.setSecret(escapedCliPassword.replace(/\\/g, '\"'));
149149
//login using svn
150-
this.throwIfError(tl.execSync("az", `login --service-principal -u "${servicePrincipalId}" -p "${escapedCliPassword}" --tenant "${tenantId}"`), tl.loc("LoginFailed"));
150+
this.throwIfError(tl.execSync("az", `login --service-principal -u "${servicePrincipalId}" --password="${escapedCliPassword}" --tenant "${tenantId}"`), tl.loc("LoginFailed"));
151151
}
152152
else if(authScheme.toLowerCase() == "managedserviceidentity") {
153153
//login using msi

Tasks/AzureCLIV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"version": {
2121
"Major": 1,
2222
"Minor": 163,
23-
"Patch": 1
23+
"Patch": 3
2424
},
2525
"minimumAgentVersion": "2.0.0",
2626
"instanceNameFormat": "Azure CLI $(scriptPath)",

Tasks/AzureCLIV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"version": {
2121
"Major": 1,
2222
"Minor": 163,
23-
"Patch": 1
23+
"Patch": 3
2424
},
2525
"minimumAgentVersion": "2.0.0",
2626
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",

Tasks/AzureCLIV2/azureclitask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class azureclitask {
134134
let escapedCliPassword = cliPassword.replace(/"/g, '\\"');
135135
tl.setSecret(escapedCliPassword.replace(/\\/g, '\"'));
136136
//login using svn
137-
Utility.throwIfError(tl.execSync("az", `login --service-principal -u "${servicePrincipalId}" -p "${escapedCliPassword}" --tenant "${tenantId}" --allow-no-subscriptions`), tl.loc("LoginFailed"));
137+
Utility.throwIfError(tl.execSync("az", `login --service-principal -u "${servicePrincipalId}" --password="${escapedCliPassword}" --tenant "${tenantId}" --allow-no-subscriptions`), tl.loc("LoginFailed"));
138138
}
139139
else if(authScheme.toLowerCase() == "managedserviceidentity") {
140140
//login using msi

Tasks/AzureCLIV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"version": {
2121
"Major": 2,
2222
"Minor": 0,
23-
"Patch": 14
23+
"Patch": 16
2424
},
2525
"minimumAgentVersion": "2.0.0",
2626
"instanceNameFormat": "Azure CLI $(scriptPath)",

Tasks/AzureCLIV2/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"version": {
2121
"Major": 2,
2222
"Minor": 0,
23-
"Patch": 14
23+
"Patch": 16
2424
},
2525
"minimumAgentVersion": "2.0.0",
2626
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",

0 commit comments

Comments
 (0)