php5 UTF-8 bug

Bug #1083824 reported by Procion
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHP-FPM
New
Undecided
Unassigned
php5 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Linux servername 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Bug found, when using pho5-fpm:

Package: php5-fpm
Status: install ok installed
Priority: optional
Section: php
Installed-Size: 8081
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Source: php5
Version: 5.3.10-1ubuntu3.4
Provides: phpapi-20090626
Depends: libbz2-1.0, libc6 (>= 2.15), libdb5.1, libpcre3 (>= 8.10), libssl1.0.0 (>= 1.0.0), libxml2 (>= 2.7.4), zlib1g (>= 1:1.1.4), mime-support, php5-common (= 5.3.10-1ubuntu3.4), libmagic1, ucf, tzdata
Pre-Depends: dpkg (>= 1.15.7.2~)
Suggests: php-pear

Php application receives registration form with two fields (Name, Surname) in ru_RU UTF-8. I've checked content of $_REQUEST and $_POST, and there array 'client', which contains fields with normal valid UTF-8 strings. But then developer of application getting 'client' array to separate array variable:

$c = $_POST['client'];

and $c then contains invalid UTF-8 sequences.

for example in source was d180d0b8
but in $c it becomes f180d0b8
as you can see, it's invalid sequence and invalid behaviour of php.

and then database engine gives error about that.

I solved issue by getting values directly:

$data = array(
                        'name' => $_POST['client']['name'],
                        'sur_name' => $_POST['client']['surName'],
)

and it works. But the bug still remains and may cause lots of problems.

Procion (klebed)
no longer affects: nova
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Please could you post a test case, complete with detailed step-by-step instructions to reproduce this problem, expected results and actual results? Ideally this would use php from the command line, but if that can't reproduce the problem then a php script to run through the web server would be fine.

Once done, please change the bug status back to New.

Changed in php5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Procion (klebed) wrote :

Unfortunately I've tried to reproduce behaviour with simple test, but have no luck. Seems that issue more complex and needs some further investigation.
And another bad thing, that i thought to provide kvm virtual machine with whole problem application, but afraid it contains some confidential info.

I will try to figure out causes by myself.

Revision history for this message
Neal Gompa (ngompa13) wrote :

There's been no information received for several years on this issue. If this is still a problem, please provide the requested information and set it back to "New".

Changed in php5 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.