Skip to content

Commit e8f7d09

Browse files
committed
LOG_HTTPS_REQUESTS: quote URL
This allows for funny business in the URL. While at it, also URL-encode option values like `[bot]`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent f271bd7 commit e8f7d09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GitForWindowsHelper/https-request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const httpsRequest = async (context, hostname, method, requestPath, body, header
2525
options.method === 'GET' ? '' : `-X ${options.method}`,
2626
...Object.entries(options.headers).map(([key, value]) => `-H ${quote(`${key}: ${value}`)}`),
2727
body ? `-d ${quote(body)}` : '',
28-
`https://${options.hostname}${options.path}`,
28+
`'https://${options.hostname}${encodeURI(options.path)}'`,
2929
].filter(e => e).join(' ')
3030
;(context.error || console.error)(commandLine)
3131
}

0 commit comments

Comments
 (0)