TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jaspreet Nayyer
NA
2
663
Static code analysis issue of Unrestricted Upload of File
Jul 13 2018 5:32 AM
We done static code analysis using Kiuwan tool for our C# project and we are stuck at "UnrestrictedUpload of File with Dangerous Type" issue at "file.SaveAs(filePath)". We tried different ways to resolve it also the ways those are defined theoretically at
https://cwe.mitre.org/data/definitions/434.html . Any help from any of you is helpful.
var directoryPath =Path.Combine(DocumentManagementRootDirectory , dbFile.ID.ToString());
Directory.CreateDirectory(directoryPath);
var path = Path.Combine(directoryPath , fName);
file.SaveAs(path);
This is the code where we get this issue. We are not getting how to fix this one. This really sucks. May there is simple fix for this but we are not getting that. Any help from all of you is appriciable.
Regards,
Reply
Answers (
0
)
How to serialise and deserialise a list in c#
given path fortmat not supported ...