Skip to content

Commit 0bda2ac

Browse files
fix: support special characters in username/password of git url
1 parent 5487132 commit 0bda2ac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/utils/extractAuthFromUrl.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@ export function extractAuthFromUrl(url: string): { url: string, auth: Auth } {
1515
// Remove credentials from URL
1616
url = url.replace(`${userpass}@`, '')
1717
// Has credentials, return the fetch-safe URL and the parsed credentials
18-
return { url, auth: { username, password } }
18+
return {
19+
url: url,
20+
auth: {
21+
username: decodeURIComponent(username),
22+
password: decodeURIComponent(password)
23+
}
24+
}
1925
}

0 commit comments

Comments
 (0)