Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-19221

long object names can get invalid utf8 when truncated

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2012.2, 4.7.0-dev, 4.6.0
    • Misc
    • None

    Description

      When an object gets a truncated name (and url) because the source attribute is longer than ContentSettings/ContentObjectNameLimit, php uses substr() to create the shortened version of the name.

      But that is not utf8-safe, and will create invalid utf8 strings. The db will then halt with a transaction failed error and prevent such object to be stored.

      As I do not think eZ wants to enable mb_* functions by default, we should fix eZNamePatternResolver::resolveNamePattern instead

      (for options: see http://stackoverflow.com/questions/1967540/truncate-a-utf-8-string-to-fit-a-given-byte-count-in-php)

      Attachments

        Activity

          People

            unknown unknown
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: