Skip to content

Commit 6955899

Browse files
Merge pull request #50 from cloudflare/kenton/fix-basic-auth
Ask Gemini to fix missing URL-decoding of basic auth credentials.
2 parents 50ae0f2 + 53f5064 commit 6955899

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/oauth-provider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,9 @@ class OAuthProviderImpl {
11181118
if (authHeader && authHeader.startsWith('Basic ')) {
11191119
// Basic auth
11201120
const credentials = atob(authHeader.substring(6));
1121-
const [id, secret] = credentials.split(':');
1122-
clientId = id;
1123-
clientSecret = secret || '';
1121+
const [id, secret] = credentials.split(':', 2);
1122+
clientId = decodeURIComponent(id);
1123+
clientSecret = decodeURIComponent(secret || '');
11241124
} else {
11251125
// Form parameters
11261126
clientId = body.client_id;

0 commit comments

Comments
 (0)