You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (Resolved) (JIRA)" <ji...@apache.org> on 2012/03/15 17:45:39 UTC

[jira] [Resolved] (FELIX-3383) FileInstall ConfigInstaller does not check filter syntax which will lead bundle start failure when felix installation directory including one of these characters ( )

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

Guillaume Nodet resolved FELIX-3383.
------------------------------------

    Resolution: Duplicate
    
> FileInstall ConfigInstaller does not check filter syntax which will lead bundle start failure when felix installation directory including one of these characters ( ) 
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3383
>                 URL: https://issues.apache.org/jira/browse/FELIX-3383
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>         Environment: Ubuntu 10.04
> Oracle jdk 6
>            Reporter: Forrest Xia
>         Attachments: FELIX-3383.patch
>
>
> This piece of code in ConfigInstaller.java could throw InvalidSyntaxException, then lead bundle start failure or unusable when the fileName string include one of these characters: ( )
> Configuration findExistingConfiguration(String fileName) throws Exception
>     {
>         String filter = "(" + DirectoryWatcher.FILENAME + "=" + fileName + ")";
>         Configuration[] configurations = getConfigurationAdmin().listConfigurations(filter);
>         if (configurations != null && configurations.length > 0)
>         {
>             return configurations[0];
>         }
>         else
>         {
>             return null;
>         }
>     }
> According to the OSGi specification 3.2.7 Filter Syntax:
> If value must contain one of the characters '\', '*', '(' or ')', then these characters
> should be preceded with the backslash ('\') character.
> fileName string could include ( or ), for example, the server is installed in a folder on windows like "C:\Program files (x86)\appserver", then the server will fail to start.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira