|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-06 04:57 UTC] yohgaki@php.net
-Status: Open
+Status: Analyzed
-Assigned To:
+Assigned To: yohgaki
[2016-08-06 17:26 UTC] nikic@php.net
[2016-08-07 01:47 UTC] yohgaki@php.net
-Status: Analyzed
+Status: Not a bug
[2016-08-07 01:47 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ logical_filters.c uses following macro in filter_private.h for trimming strings. #define PHP_FILTER_TRIM_DEFAULT_EX(p, len, return_if_empty) { \ while ((len > 0) && (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\v' || *p == '\n')) { \ p++; \ len--; \ } \ if (len < 1 && return_if_empty) { \ RETURN_VALIDATION_FAILED("Filter validated value became empty after trim", 0); \ } \ if (len > 0) { \ while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || p[len-1] == '\v' || p[len-1] == '\n') { \ len--; \ } \ } \ } As you can see by the code, trailing spaces are not trimmed, but it only shorten length by counting spaces in it. e.g. ' 1234 5678' would result in unwanted condition.