Repository navigation
fix(matcher): avoid exponential backtracking on .* repeatable params - #2819
Conversation
✅ Deploy Preview for vue-router canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughRepeatable parameters with the exact patterns ChangesCatch-all parsing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The wildcard-repeat change preserves the inspected matching and parsed-value behavior; no merge-blocking risk is identified. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change removes unnecessary backtracking while preserving route selection and parameter handling. No new access boundary, privilege, or material security risk was identified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2819 +/- ##
==========================================
+ Coverage 87.24% 88.26% +1.01%
==========================================
Files 76 78 +2
Lines 6068 6305 +237
Branches 1955 2071 +116
==========================================
+ Hits 5294 5565 +271
+ Misses 683 651 -32
+ Partials 91 89 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
posva
left a comment
There was a problem hiding this comment.
Thanks! I did a small adaptation
Repeatable params wrap the custom regexp as ((?:re)(?:/(?:re))*) to handle the leading slash between segments. This causes the engine to backtrack through them.
Fix: emit (${re}) instead of the repeat wrapper when the custom regexp is exactly .* or .+. Same results. Linear time instead.
Closes #1301
Summary by CodeRabbit