Sources
Simon Willison: TRE Python Binding for ReDoS-Proof Regex — 'Good Enough for antirez to Add to Redis'
Willison explored Ville Laurikari's TRE regex engine as a Python binding after Salvatore Sanfilippo integrated it into Redis. TRE guarantees O(n) matching time regardless of pattern complexity, making it immune to ReDoS (Regular Expression Denial of Service) attacks — a practical security tool for any service accepting user-supplied patterns. Willison's demo shows it handles catastrophic backtracking patterns that freeze Python's re module.
↳ Follow the thread