Skip to content

Commit

Permalink
lazy evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
levensta committed Sep 24, 2023
1 parent ba0ea68 commit db1da9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/url-sanitizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function safeDecodeURI (path, useSemicolonDelimiter) {
// Some systems do not follow RFC and separate the path and query
// string with a `;` character (code 59), e.g. `/foo;jsessionid=123456`.
// Thus, we need to split on `;` as well as `?` and `#` if the useSemicolonDelimiter option is enabled.
} else if (charCode === 63 || charCode === 35 || (useSemicolonDelimiter && charCode === 59)) {
} else if (charCode === 63 || charCode === 35 || (charCode === 59 && useSemicolonDelimiter)) {
querystring = path.slice(i + 1)
path = path.slice(0, i)
break
Expand Down

0 comments on commit db1da9f

Please sign in to comment.