Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-30465

Make directory sync more robust when handling names with emoji characters

    XMLWordPrintable

    Details

    • UIS:
      2
    • Support reference count:
      4
    • Feedback Policy:
      We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Description

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      Directory sync via ldap connection will break if some condition fails to meet a constraint, collation, etc.

      Improvement request to digest that error, report it to the admin, and continue on with the sync through completion.

      Graceful handling of errors without breaking sync.

      For example:
      Mysql database, utf8 characterset, utf8_bin collation. User directory sync with ldap system. LDAP user has emoji in name. When directory sync occurs, confluence logs report this error:

      ERROR [scheduler_Worker-6] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 13205505 ].
      org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not update: com.atlassian.crowd.model.user.InternalUser#17850980; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: '\xF0\x9F\x90\x9C' for column 'first_name' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xF0\x9F\x90\x9C' for column 'first_name' at row 1
      

      Another example:

      ERROR [scheduler_Worker-4] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 59146241 ].
      org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not update: [com.atlassian.crowd.model.user.InternalUser#69320708]; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: '\xF0\x9F\x8E\x88' for column 'first_name' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xF0\x9F\x8E\x88' for column 'first_name' at row 1
      

      '\xF0\x9F\x90\x9C', turns out to be emoji ant. This occurred on mysql 5.1. Upgrading to mysql 5.5.3 and setting characterset on tables to utf8mb4 does not resolve the issue. See here for more details:
      http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html

      Once upgraded to mysql 5.5.3 a command line client can insert an emoji character into the database and the database handles this fine. When Confluence tries to sync an emoji character, the sync breaks and Confluence throws an error.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rgoodwin Ryan
              Votes:
              7 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: