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 20:06:00 UTC

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

     [ https://issues.apache.org/jira/browse/SLING-10546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Sedding resolved SLING-10546.
------------------------------------
    Resolution: Fixed

Fixed with [commit f8efc36|https://github.com/apache/sling-org-apache-sling-junit-core/commit/f8efc368d2fb38f3b55d50044d98b5db88b71ea2].

> 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
>            Priority: Major
>             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)