Decode ctx.params before using in routes#832
Conversation
PR ReviewThis is a clean, focused fix. One issue worth addressing before merging: 🟡 Potential Bugs
// Current
ctx.params[param] = decodeURIComponent(ctx.params[param])
// Suggested – fall back to the raw value if decoding fails
try {
ctx.params[param] = decodeURIComponent(ctx.params[param])
} catch {
// leave param as-is; downstream validation will reject invalid values
}Test CoverageThe added test only covers the happy path (spaces encoded as Everything else looks good — the middleware is correctly placed before route-specific middleware, the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #832 +/- ##
========================================
Coverage 95.68% 95.69%
========================================
Files 378 379 +1
Lines 5915 5919 +4
Branches 766 766
========================================
+ Hits 5660 5664 +4
Misses 149 149
Partials 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.