Skip to content

Commit 4fefb0a

Browse files
committed
Add comment to extractStringsFromUserInput
1 parent 35328bb commit 4fefb0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/helpers/extractStringsFromUserInput.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export function extractStringsFromUserInput(obj: unknown): Set<UserString> {
3535
if (obj.includes("%") && obj.length >= 3) {
3636
const r = safeDecodeURIComponent(obj);
3737
if (r && r !== obj) {
38+
// Only add if the decoded value is different from the original, to avoid duplicates in results
39+
// This improves the performance of all injection tests
3840
results.add(r);
3941
}
4042
}

0 commit comments

Comments
 (0)