Skip to content

SCS0016 with custom AntiForgery filter attribute like ValidateHeaderAntiForgeryTokenAttribute #149

@melcug

Description

@melcug

Environment:

  • Version [3.3.0]
  • Branch [SCS0016]
  • Visual Studio [2019 (16.3.6)]
  • OS: [Windows]

Description of the bug:
Passing AntiForgeryToken in a JSON post request along wih JSON.stringify is not working so I applied the solution (creating a custom filter and passing the token to ajax request in header) provided on https://stackoverflow.com/questions/45866060/passing-antiforgerytoken-in-a-json-post-request-along-wih-json-stringify-is-not.

SCS0016 is still reported even I added [ValidateHeaderAntiForgeryToken] attribute to my methods.

Now, is difficult to know to which of the methods with [HttpPost] attribute is missing the attribute [ValidateHeaderAntiForgeryToken], because all are reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions