diff --git a/.changeset/plenty-plums-talk.md b/.changeset/plenty-plums-talk.md new file mode 100644 index 0000000000..fe971d0476 --- /dev/null +++ b/.changeset/plenty-plums-talk.md @@ -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 diff --git a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts index 3900882940..d50888006b 100644 --- a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts +++ b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts @@ -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,