Projects STRLCPY Taipan Commits 525c5c42
🤬
  • ■ ■ ■ ■ ■ ■
    Src/ES.Taipan.Inspector.AddOns/ErrorMessages/ErrorMessagesAddOn.fs
    skipped 78 lines
    79 79   let checkDotNetErrors(html: String, securityIssue: SecurityIssue) =
    80 80   let errors =
    81 81   [
    82  - "<b> Description: </b>";
     82 + "<b> Description: </b>"
    83 83   "An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated."
    84 84   ]
    85 85   if errors |> List.forall (html.Contains) then
    86 86   securityIssue.Note <- "ASP.NET error"
    87 87   securityIssue.Details.Properties.Add("Error", errors.[0])
     88 + this.Context.Value.AddSecurityIssue(securityIssue)
     89 + 
     90 + let checkIISErrors(html: String, securityIssue: SecurityIssue) =
     91 + let errors =
     92 + [
     93 + "Failed Request Tracing Log Directory"
     94 + "Detailed Error Information"
     95 + "Requested URL"
     96 + "Physical Path"
     97 + ]
     98 + if errors |> List.forall (html.Contains) then
     99 + securityIssue.Note <- "IIS error"
     100 + securityIssue.Details.Properties.Add("Error", errors.[0])
     101 + 
     102 + let rxMatch = Regex.Match(html, "<tr><th>Physical Path</th><td>(.+?)</td></tr> ", RegexOptions.Singleline)
     103 + if rxMatch.Success then
     104 + securityIssue.Details.Properties.Add("Physical Path", rxMatch.Groups.[0].Value.Trim())
     105 + 
    88 106   this.Context.Value.AddSecurityIssue(securityIssue)
    89 107   
    90 108   let checkApacheTomcatErrors(html: String, securityIssue: SecurityIssue) =
    skipped 54 lines
    145 163   checkApacheTomcatErrors(html, securityIssue)
    146 164   checkJBossErrors(html, securityIssue)
    147 165   checkForJasperException(html, securityIssue)
     166 + checkIISErrors(html, securityIssue)
Please wait...
Page is in error, reload to recover