Skip to content

Commit 6f01acf

Browse files
committed
docs(settings): clarify pattern length cap is not a ReDoS bound
1 parent 39401b4 commit 6f01acf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎server/utils/ignoredPathPatterns.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import safeRegex from 'safe-regex';
22

3-
// safe-regex is a heuristic, not a guarantee; the length cap bounds the
4-
// complexity of anything it lets through.
3+
// safe-regex is a heuristic with known false negatives, and the length cap
4+
// only limits pattern size, not matching complexity. Patterns are
5+
// admin-configured, so a pathological pattern is a self-inflicted risk.
56
const MAX_PATTERN_LENGTH = 256;
67

78
export function compileIgnoredPathPattern(pattern: string): RegExp | null {

0 commit comments

Comments
 (0)