VeraCode-网页中与脚本相关的HTML标签的中和不正确(基本XSS)(CWE ID 80)?

时间:2017-06-13 11:14:40

标签: c# asp.net veracode

VeraCode已在try块关闭括号中为以下代码提供高优先级问题。

    public string GenerateExcelFilePath(string strFileName)
    {

        string strExcelFileFullFilePath = string.Empty;
        string strFolderName = string.Empty;
        ExcelGeneration objExcelFile = null;
        UserImpersonation objUserImpersonation = null;
        try
        {
            strFolderName = "Excel Files";
            objExcelFile = new ExcelGeneration();
            objUserImpersonation = new UserImpersonation();
            objUserImpersonation.impersonateUser(DACommon.Shared_UserName, DACommon.Shared_Domain, DACommon.Shared_Password);

            // Use Path.Combine
            strExcelFileFullFilePath = objExcelFile.GetExcelFilePath(strFileName, strFolderName);
            strExcelFileFullFilePath = HttpUtility.UrlDecode(strExcelFileFullFilePath, System.Text.Encoding.Default);

            // IF file exists,delete the file
            objExcelFile.CheckIsFileExists(strExcelFileFullFilePath);
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            throw ex;
        }
        return strExcelFileFullFilePath;

    }

0 个答案:

没有答案