Bug #75187 [NEW]: Unexpected extra characters output in file/page.
| From: | frederic dot nicolas_xkpad at laposte dot net | Date: | Mon, 11 Sep 2017 12:40:41 +0000 |
| Subject: | Bug #75187 [NEW]: Unexpected extra characters output in file/page. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-211067@lists.php.net to get a copy of this message | ||
From: frederic dot nicolas_xkpad at laposte dot net
Operating system: DSM 6.1.3-15152 Update 4
PHP version: 7.0.23
Package: *General Issues
Bug Type: Bug
Bug description:Unexpected extra characters output in file/page.
Description:
------------
Unexpected extra characters output in file/page, creating not working
page when these unexpected characters interfer with JS/Html code in the
output page.
Exemple provided.
According to tests on my side regarding this exemple:
- can change the letter "a" (in "<a") to whatever letter + add other
letters
- cannot suppress other character after "<script>" but lot more
character can be added in the <script>..</script> part
- the position of the unexpected extra character changes according to
the number of characters/line in the <script>..</script> part
In the code where I noticed the problem, there where many characters
before the <script> part, which itself included several JS functions.
The unexepected extra character make the JS not working.
Test script:
---------------
<html>
<?php
$z = 98270;
for ($i=0; $i<$z; $i++) echo "q";
?>
<script>
<!--
<a
-->
</script>
</html>
Expected result:
----------------
<html>
....qq<script>
<!--
<a
--></script>
</html>
Actual result:
--------------
<html>
....qq<script>
<!--
<a
--></a/script>
</html>
--
Edit bug report at https://bugs.php.net/bug.php?id=75187&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75187&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75187&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75187&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75187&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75187&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75187&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75187&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75187&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75187&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75187&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75187&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75187&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75187&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75187&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75187&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75187&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75187&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75187&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75187&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75187&r=mysqlcfg