Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-33170

Upgrade to Embedded Crowd 2.6.2 or later - Directory Sync Fails if there are Users or Groups with Curly Braces in their User/Groupname (can't parse argument number error)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 6.1-OD-03
    • 6.0, 6.0.2
    • None

    Description

      Symptoms

      • Directory sync fails with errors such as this:
        java.lang.IllegalArgumentException: can't parse argument number: 5c2d3f31-249f-4455-b1fb-8f190de41a9c
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.text.MessageFormat.makeFormat(MessageFormat.java:1420)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.text.MessageFormat.<init>(MessageFormat.java:363)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.text.MessageFormat.format(MessageFormat.java:835)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.util.TimedOperation.complete(TimedOperation.java:18)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.syncUserMembersForGroup(DirectoryCacheImplUsingChangeOperations.java:124)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:145)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:84)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:124)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:644)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | Caused by: java.lang.NumberFormatException: For input string: "5c2d3f31-249f-4455-b1fb-8f190de41a9c"
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.lang.Integer.parseInt(Integer.java:492)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.lang.Integer.parseInt(Integer.java:527)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	at java.text.MessageFormat.makeFormat(MessageFormat.java:1418)
        INFO   | jvm 1    | 2013/05/21 12:52:32 | 	... 14 more
        

      Cause

      JIRA (Embedded CWD) parses the curly braces as a numerical argument.

      Observation

      • If the groupname instead, is this: usergroup {2}

        , the error will not be thrown

      • Only happens in JIRA 6.0. 5.2 and below is not affected

      Workaround

      Change the Group/User Object Filter to something like this (to filter out groups/users containing the curly braces):

      Group Filter
      (&(objectCategory=Group)(!(cn=*{*}*)))
      
      User Filter
      (&(objectCategory=Person)(!(sAMAccountName=*{*}*)))
      

      The example above applies for Active Directory with the username attribute set to sAMAccountName and groupname attribute set to cn. These are the default settings.

      This will prevent users and groups being added to JIRA that contain curley braces. This can potentially delete groups and users from the instance.

      Attachments

        Issue Links

          Activity

            People

              edalgliesh Eric Dalgliesh
              jgarcia John Garcia (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: