Merge pull request #21795 from awanlin/topic/use-encode-uri-compoenent

[Azure DevOps] Updated to use `encodeURIComponent`
This commit is contained in:
Patrik Oldsberg
2023-12-12 16:39:51 +01:00
committed by GitHub
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,