Skip to content

bad query params to #range_limit action should not result in uncaught exception#305

Merged
seanaery merged 2 commits intomainfrom
bad_range_limit_params
Dec 6, 2024
Merged

bad query params to #range_limit action should not result in uncaught exception#305
seanaery merged 2 commits intomainfrom
bad_range_limit_params

Conversation

@jrochkind
Copy link
Member

@jrochkind jrochkind commented Dec 4, 2024

Note that raising these specific excpetions will be automatically turned by rails into BadRequest => http 400, and NotFound => http 404 response.

The basic goal is that there should be no URL you can construct that will reuslt in an uncaught exception.

Because I hate it when my exception monitor alerts me for things that were random non-working URLs that some bot looking for vulnerabilities or malfunctioning came up with. They didn't find vulnerabilities, but they did find something that caused the logic to raise unexpectedly.

These are all cases seen in the exception monitor in my actual deployed production app; I've been catching/ignoring them locally.

@jrochkind jrochkind force-pushed the bad_range_limit_params branch from 1455ed9 to e285ad4 Compare December 4, 2024 00:22
… exception

Note that raising these specific excpetions will be automatically turned by rails into BadRequest => http 400, and NotFound => http 404 response.
@jrochkind jrochkind force-pushed the bad_range_limit_params branch from e285ad4 to 4f74fe3 Compare December 4, 2024 00:25
@jrochkind
Copy link
Member Author

Sadly too late for beta2!

@jrochkind
Copy link
Member Author

jrochkind commented Dec 4, 2024

Aha, requires some extra logic to work in BL 7.x too, forthcoming.

This is why we have CI!

@seanaery seanaery merged commit 1239284 into main Dec 6, 2024
@seanaery seanaery deleted the bad_range_limit_params branch December 6, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants