jbruinaud / WebGoatNet

WebGoat .Net for demos
0 stars 0 forks source link

CX Improper_Resource_Shutdown_or_Release @ Content/PathManipulation.aspx.cs [master] #197

Open jbruinaud opened 4 years ago

jbruinaud commented 4 years ago

Improper_Resource_Shutdown_or_Release issue exists @ Content/PathManipulation.aspx.cs in branch master

The application's ResponseFile method in Content\PathManipulation.aspx.cs defines and initializes the FileStream object at 65. This object encapsulates a limited computing resource, such as open file streams, database connections, or network streams. This resource is not properly closed and released in all situations. 

Severity: Low

CWE:404

Checkmarx

Lines: 69 70


Code (Line #69):

                FileStream myFile = new FileStream(_fullPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

Code (Line #70):

                BinaryReader br = new BinaryReader(myFile);