File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ const runSingleRequest = async function (
211
211
let uriPort = isUndefined ( proxyPort ) || isNull ( proxyPort ) ? '' : `:${ proxyPort } ` ;
212
212
let proxyUri ;
213
213
if ( proxyAuthEnabled ) {
214
- const proxyAuthUsername = interpolateString ( get ( proxyConfig , 'auth.username' ) , interpolationOptions ) ;
215
- const proxyAuthPassword = interpolateString ( get ( proxyConfig , 'auth.password' ) , interpolationOptions ) ;
214
+ const proxyAuthUsername = encodeURIComponent ( interpolateString ( get ( proxyConfig , 'auth.username' ) , interpolationOptions ) ) ;
215
+ const proxyAuthPassword = encodeURIComponent ( interpolateString ( get ( proxyConfig , 'auth.password' ) , interpolationOptions ) ) ;
216
216
217
217
proxyUri = `${ proxyProtocol } ://${ proxyAuthUsername } :${ proxyAuthPassword } @${ proxyHostname } ${ uriPort } ` ;
218
218
} else {
Original file line number Diff line number Diff line change @@ -324,8 +324,8 @@ function setupProxyAgents({
324
324
let uriPort = isUndefined ( proxyPort ) || isNull ( proxyPort ) ? '' : `:${ proxyPort } ` ;
325
325
let proxyUri ;
326
326
if ( proxyAuthEnabled ) {
327
- const proxyAuthUsername = interpolateString ( get ( proxyConfig , 'auth.username' ) , interpolationOptions ) ;
328
- const proxyAuthPassword = interpolateString ( get ( proxyConfig , 'auth.password' ) , interpolationOptions ) ;
327
+ const proxyAuthUsername = encodeURIComponent ( interpolateString ( get ( proxyConfig , 'auth.username' ) , interpolationOptions ) ) ;
328
+ const proxyAuthPassword = encodeURIComponent ( interpolateString ( get ( proxyConfig , 'auth.password' ) , interpolationOptions ) ) ;
329
329
proxyUri = `${ proxyProtocol } ://${ proxyAuthUsername } :${ proxyAuthPassword } @${ proxyHostname } ${ uriPort } ` ;
330
330
} else {
331
331
proxyUri = `${ proxyProtocol } ://${ proxyHostname } ${ uriPort } ` ;
You can’t perform that action at this time.
0 commit comments