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
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