Zend Framework

Infinite loop in StripTags

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.6
  • Fix Version/s: 1.10.7
  • Component/s: Zend_Filter
  • Labels:
    None

Description

Hello,

using special characters (we do not where they come from, we received this character from our blog platform), StripTags enters in an infinite loop when trying to remove the comments

I'll attach a test case that fail, a proposition of patch that solve the problem.

Regards,

Raphaël Dehousse

  1. ZF-10119_StripTags.patch
    08/Jul/10 1:07 AM
    0.5 kB
    Raphael Dehousse
  2. ZF-10119_StripTags.php
    08/Jul/10 1:03 AM
    0.4 kB
    Raphael Dehousse

Activity

Hide
Raphael Dehousse added a comment -

The test case that fail because of a max execution time exceeded

Show
Raphael Dehousse added a comment - The test case that fail because of a max execution time exceeded
Hide
Raphael Dehousse added a comment -

And a patch that solve the problem

Maybe there is a reason with the "u" modifier was there, so, maybe it's not the good solution, but in any case, like that, the test pass

Thanks!

Best regards,

Raphaël Dehousse

Show
Raphael Dehousse added a comment - And a patch that solve the problem Maybe there is a reason with the "u" modifier was there, so, maybe it's not the good solution, but in any case, like that, the test pass Thanks! Best regards, Raphaël Dehousse
Hide
Thomas Weidner added a comment -

Without the "u" modifier any unicode regex will fail. This is a negotation of existing functionality.

Therefor this patch is not accepted.

Show
Thomas Weidner added a comment - Without the "u" modifier any unicode regex will fail. This is a negotation of existing functionality. Therefor this patch is not accepted.
Hide
Thomas Weidner added a comment -

Added UTF8 tests. Patch works as expected and has been added.

Show
Thomas Weidner added a comment - Added UTF8 tests. Patch works as expected and has been added.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: