Updated to use encodeURIComponent

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2023-12-08 12:56:58 -06:00
parent 139b364198
commit 646db723bd
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-azure-devops-backend': patch
---
Updated encoding of Org to use `encodeURIComponent` when building URL used to get credentials from credential provider
@@ -110,7 +110,7 @@ export class AzureDevOpsApi {
// which is why use them here and not just falling back on them entirely
const validHost = host ?? this.config.getString('azureDevOps.host');
const validOrg = org ?? this.config.getString('azureDevOps.organization');
const url = `https://${validHost}/${encodeURI(validOrg)}`;
const url = `https://${validHost}/${encodeURIComponent(validOrg)}`;
const credentials = await this.credentialsProvider.getCredentials({
url,