sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arek Kita (JIRA)" <>
Subject [jira] [Created] (SLING-8622) Incorrect OSGi configuration ID leads to StringIndexOutOfBoundException
Date Thu, 08 Aug 2019 10:58:00 GMT
Arek Kita created SLING-8622:

             Summary: Incorrect OSGi configuration ID leads to StringIndexOutOfBoundException
                 Key: SLING-8622
             Project: Sling
          Issue Type: Bug
          Components: Installer
    Affects Versions: Installer Configuration Factory 1.2.4
            Reporter: Arek Kita

TheĀ {{ConfigUpdateHandler}} class and mostly [2 methods|]
inside seems to be not safe enough and they lead to runtime exception like this:

{noformat:title=Runtime Exception}
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of
range: 43
	at java.base/java.lang.StringLatin1.charAt(
	at java.base/java.lang.String.charAt(
	at com.adobe.empty.Main.getFactoryPidAndPid(
	at com.adobe.empty.Main.main(

which prevents Installer to be working correctly. The exception on a *faulty input* can be
reproduced using the simple main class as a POC:  [^] 

h4. Actual behavior 

The whole update handler is aborted due to one faulty name of the OSGi config and the update
and installer thread is stopped

h4. Expected behavior 

The wrong configuration name should be either skipped or converted if possible to the correct
name not leading to stop in update thread.

This message was sent by Atlassian JIRA

View raw message