2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

fix: Regular Expression Denial of Service (ReDoS) (#6132)

This commit is contained in:
Willian Agostini
2023-12-26 17:29:26 -03:00
committed by GitHub
parent 8befb86efb
commit 5e7ad38fb0
2 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -10,6 +10,6 @@
*/
export default function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}