Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10115

BBcodes not working if post contains about or more 55000 non-english symbols

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.9-RC1
    • Component/s: Posting
    • Labels:
      None

      Description

      If post contains about or more 55000 symbols, then BBcodes (b, i or quote for example) cease to work

      I posted details on russian support forum:
      http://www.phpbbguru.net/community/topic16064-375.html#p293331
      But i don't know, whether they have informed you or have simply ignored my message as there.

      IMPORTANT NOTES:
      1) Bug exists only if the symbols are russians (maybe for other languages except for english also, i don't know, because didn't check). For english all works normally even if there are 100000 symbols (didn't check for more)
      2) I haven't revealed exact regularity of bug appearance. In one cases it works, in others - not, as test file that i attached below or quote in the beginning of this message, for example:
      http://www.ninjaturtles.ru/forum/viewtopic.php? p=231068#p231068

      Also, at attempt to edit this message, it becomes empty

        Issue Links

          Activity

          Hide
          rxu Ruslan Uzdenov added a comment -

          Now UTF-8 is turned on for all BBCodes. But for the information, PCRE has some limitations which may affect entire phpBB as well and couldn't be fixed within codebase. PCRE man pages:

          LIMITATIONS

          There are some size limitations in PCRE but it is hoped that they will
          never in practice be relevant.

          The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE
          is compiled with the default internal linkage size of 2. If you want to
          process regular expressions that are truly enormous, you can compile
          PCRE with an internal linkage size of 3 or 4 (see the README file in
          the source distribution and the pcrebuild documentation for details).
          In these cases the limit is substantially larger. However, the speed
          of execution is slower.

          All values in repeating quantifiers must be less than 65536.

          There is no limit to the number of parenthesized subpatterns, but there
          can be no more than 65535 capturing subpatterns.

          The maximum length of name for a named subpattern is 32 characters, and
          the maximum number of named subpatterns is 10000.

          The maximum length of a subject string is the largest positive number
          that an integer variable can hold. However, when using the traditional
          matching function, PCRE uses recursion to handle subpatterns and indef-
          inite repetition. This means that the available stack space may limit
          the size of a subject string that can be processed by certain patterns.
          For a discussion of stack issues, see the pcrestack documentation.

          Show
          rxu Ruslan Uzdenov added a comment - Now UTF-8 is turned on for all BBCodes. But for the information, PCRE has some limitations which may affect entire phpBB as well and couldn't be fixed within codebase. PCRE man pages : LIMITATIONS There are some size limitations in PCRE but it is hoped that they will never in practice be relevant. The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE is compiled with the default internal linkage size of 2. If you want to process regular expressions that are truly enormous, you can compile PCRE with an internal linkage size of 3 or 4 (see the README file in the source distribution and the pcrebuild documentation for details). In these cases the limit is substantially larger. However, the speed of execution is slower. All values in repeating quantifiers must be less than 65536. There is no limit to the number of parenthesized subpatterns, but there can be no more than 65535 capturing subpatterns. The maximum length of name for a named subpattern is 32 characters, and the maximum number of named subpatterns is 10000. The maximum length of a subject string is the largest positive number that an integer variable can hold. However, when using the traditional matching function, PCRE uses recursion to handle subpatterns and indef- inite repetition. This means that the available stack space may limit the size of a subject string that can be processed by certain patterns. For a discussion of stack issues, see the pcrestack documentation.
          Hide
          Shredder Shredder added a comment -

          Seems phpBB problem solved? Ok then.

          Show
          Shredder Shredder added a comment - Seems phpBB problem solved? Ok then.
          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          Can a couple tests be added here?

          Show
          Oleg Oleg [X] (Inactive) added a comment - Can a couple tests be added here?
          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          The fix seems to not affect existing posts suffering from this bug.

          Reparsing all posts seems too extreme, maybe a release note would be enough.

          Show
          Oleg Oleg [X] (Inactive) added a comment - The fix seems to not affect existing posts suffering from this bug. Reparsing all posts seems too extreme, maybe a release note would be enough.
          Hide
          AmigoJack AmigoJack added a comment -

          This is at least partly a duplicate of http://tracker.phpbb.com/browse/PHPBB3-9720 - PHP's default PREG settings won't handle a text of more than 100000 bytes (and non-english characters in UTF-8 easily become multibytes).

          Show
          AmigoJack AmigoJack added a comment - This is at least partly a duplicate of http://tracker.phpbb.com/browse/PHPBB3-9720 - PHP's default PREG settings won't handle a text of more than 100000 bytes (and non-english characters in UTF-8 easily become multibytes).

            People

            • Assignee:
              rxu Ruslan Uzdenov
              Reporter:
              Shredder Shredder
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development