You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Sedding (Jira)" <ji...@apache.org> on 2021/06/24 15:16:00 UTC

[jira] [Created] (SLING-10546) RequestParser#acceptTestName is too lenient

Julian Sedding created SLING-10546:
--------------------------------------

             Summary: RequestParser#acceptTestName is too lenient
                 Key: SLING-10546
                 URL: https://issues.apache.org/jira/browse/SLING-10546
             Project: Sling
          Issue Type: Bug
          Components: JUnit Core, Testing
    Affects Versions: JUnit Core 1.0.6
            Reporter: Julian Sedding
            Assignee: Julian Sedding
             Fix For: JUnit Core 1.1.6


{{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).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)