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

IDISP001 False Positive with MemoryStream and File Return #535

Open
ondrejholik opened this issue Oct 17, 2023 · 0 comments
Open

IDISP001 False Positive with MemoryStream and File Return #535

ondrejholik opened this issue Oct 17, 2023 · 0 comments

Comments

@ondrejholik
Copy link

var imageStream = new MemoryStream();
return File(imageStream, "image/png");

Should not trigger IDISP001

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.file?view=aspnetcore-7.0&viewFallbackFrom=net-7.0

@ondrejholik ondrejholik changed the title Fix IDISP001 False Positive with MemoryStream and File Return IDISP001 False Positive with MemoryStream and File Return Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant