Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S6932 FP: IFormCollection.Files access should be compliant #9344

Closed
martin-strecker-sonarsource opened this issue May 27, 2024 · 0 comments · Fixed by #9352
Closed

Fix S6932 FP: IFormCollection.Files access should be compliant #9344

martin-strecker-sonarsource opened this issue May 27, 2024 · 0 comments · Fixed by #9352
Assignees
Labels
Area: C# C# rules related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Positive Rule IS triggered when it shouldn't be.

Comments

@martin-strecker-sonarsource
Copy link
Contributor

martin-strecker-sonarsource commented May 27, 2024

Description

[HttpPost]
public IActionResult SomeAction(IFormCollection formCollection)
{
    var files = formCollection.Files; // Noncompliant FP
    // ..
}

We recommend using IFormCollection for binding in the RSpec of S6932. formCollection.Files should therefore also be compliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants