Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13790

Security hotspot page fails to load hotspot that doesn't have associated lines of code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.4.1
    • Fix Version/s: 8.5
    • Component/s: Security Hotspots, Web
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Steps to reproduce

      Analyze a php project with a php.ini that will trigger rule php:S2092. Loading this hotspot in the security hotspot page will crash.

      Proposed solution

      This is a common use-case that has been missed during the implementation of the new page. We should deal with hotspot without associated line and not try to load those lines in such case. We should still display the filename (that is available).

      Do we just hide the code snippet? Or replace it by a message saying that there's nothing to show?

      Since Security Hotspots with no code snippets are not common, we believe that user might be surprised not to see a code snippet. We will had a sentence in this case to make prevent any confusion:

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              philippe.perrin Philippe Perrin
              Reporter:
              philippe.perrin Philippe Perrin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: