Bug #76950 [NEW]: rtrim not working

From: Date: Sat, 29 Sep 2018 20:36:23 +0000
Subject: Bug #76950 [NEW]: rtrim not working
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217295@lists.php.net to get a copy of this message
From:             tobias at tromm dot no-ip dot org
Operating system: Windows Server 2016
PHP version:      7.2.10
Package:          *General Issues
Bug Type:         Bug
Bug description:rtrim not working

Description:
------------
Hi.

The function rtrim is not working correctly if user uses ASCII table to
cheat the system.

Please check the full example I am given with some fix [probably there
is a better way to fix it, but, it is working].


Test script:
---------------
https://www.papinho.com/PHP_bug.zip

Expected result:
----------------
Result String: "David"

This is the result with my fix script.

Actual result:
--------------
Given String: "           David           "

Given String with the use of php trim function: "          David        
 "

-- 
Edit bug report at https://bugs.php.net/bug.php?id=76950&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76950&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76950&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76950&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76950&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76950&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76950&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76950&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76950&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76950&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76950&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76950&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76950&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76950&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76950&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76950&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76950&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76950&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76950&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76950&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76950&r=mysqlcfg



Thread (11 messages)

« previous php.bugs (#217295) next »