Skip to content

Why perform validation method before authorization verification ? #481

Closed
@illambo

Description

@illambo

Versions:

  • graphql-laravel Version: 2.1
  • Laravel Version: 5.8
  • PHP Version: 7.1

Question:

About issue resolved in #407 in my opinion it was better to check first authorize method and than perform validation rules, this prevents any superfluous and possibly redundant validation queries.

For example Rule::exists check in db if the input data exists, even if I might not have permission to do this. I think this generates bypass the acl controls.

What do you think ? Where I'm wrong ?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions