Ticket #524 (closed Bug: fixed)

Opened 7 months ago

Last modified 7 months ago

Forge length validation is not utf8-aware

Reported by: Stalwart Owned by: Shadowhand
Priority: minor Milestone: 2.2
Component: Modules:Forge Version: SVN HEAD
Keywords: utf8 forge validation Cc:

Description

modules/forge/libraries/Form_Input.php, line 537: if (($length = strlen($this->value)) === 0)

It's not utf8-aware and calculates length incorrectly for non-ascii languages like russian (2bytes per char).

Proper line: if (($length = utf8::strlen($this->value)) === 0)

Change History

Changed 7 months ago by Geert

  • keywords utf8 forge added; utf8, forge, removed
  • status changed from new to closed
  • resolution set to fixed

Fixed in r2362

Note: See TracTickets for help on using tickets.