I have an application in asp.net, which uses the Veracode scan for detecting any security flaws in the application. When scanning for one of my functions shows the following error "External Control of File Name or Path". Anyone know how to fix this error?
sample code:
if (!Directory.Exists(fullPath))
Directory.CreateDirectory(fullPath);
I have tried validating the fullPath parameter for invalid characters, referred below url. But the issue still persists. Can anyone please help me in fixing this issue? Thanks.