Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10546

RequestParser#acceptTestName is too lenient

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JUnit Core 1.0.6
    • JUnit Core 1.1.6
    • JUnit Core, Testing
    • None

    Description

      RequestParser#acceptTestName(String) checks if the test-class name starts with the relevant URL path segment. This is desirable when listing test-classes restricted by java package names. However, the logic also allows inner classes to pass through.

      This lenient check in combination with the TeleporterRule (actually ClientSideTeleporter#buildTestBundle) setting Sling-Test-Regexp to the fully qualified class-name of the test class followed by a wildcard (".*") causes inner classes of test-classes to be available as tests and their execution is also attempted (which most likely fails).

      Attachments

        Activity

          People

            jsedding Julian Sedding
            jsedding Julian Sedding
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: