params checker doesn't take into account fetch
in some contexts
#2
Labels
invalid
This doesn't seem right
fetch
in some contexts
#2
Model.new({something: params.fetch(:something_id)})
isn't flagged by the authz cop in some contexts due tofetch
not being tracked in the same waypermit
is. Addingfetch
catches it but introduces false positives due to the way method return values are propagated.Diff:
Applying this ends up treating these two return values the same, but they are definitely not:
current_user.objects.unwrap_or_raise!.find(params.permit(:object_id))
params.permit(:object_id)
The text was updated successfully, but these errors were encountered: