]> cat aescling's git repositories - mastodon.git/commit
Ensure that boolean params in the API are parsed for truthiness (#6575)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 1 Mar 2018 01:47:59 +0000 (02:47 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Mar 2018 01:47:59 +0000 (02:47 +0100)
commitfce8464077dfca64c3bc9a52b7bcde50c9ac555e
treee99eedf4a8e23ae1415ac51e833751510e6ec2b4
parent47bdb9b33b021c92bdfc6698914776eda13f6f77
Ensure that boolean params in the API are parsed for truthiness (#6575)

Use Rails smart boolean cast to account for values such as "f",
"0", "false", etc. Previously, if a param was present in the request,
it would count as true.
app/controllers/api/base_controller.rb
app/controllers/api/v1/accounts/search_controller.rb
app/controllers/api/v1/accounts/statuses_controller.rb
app/controllers/api/v1/accounts_controller.rb
app/controllers/api/v1/search_controller.rb
app/controllers/api/v1/timelines/public_controller.rb
app/controllers/api/v1/timelines/tag_controller.rb