Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3383

FileInstall ConfigInstaller does not check filter syntax which will lead bundle start failure when felix installation directory including one of these characters ( )

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • File Install
    • None
    • Ubuntu 10.04
      Oracle jdk 6

    Description

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            xiaming Ming Xia
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment