|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-01-29 17:52 UTC] yunosh@php.net
Description: ------------ This is somewhat hard to describe, but I can reproduce this running the test script below from inside this directory: https://github.com/horde/horde/tree/master/framework/Auth/test/Horde/Auth You probably only need Autoload.php, TestCase.php, and one of the *Test.php files. It happens for any of those. opcode cache is disabled. Test script: --------------- require "Autoload.php"; require "Unit/PasswdTest.php"; Actual result: -------------- 㼼桰⨯ਪ⨠䈠獡潦整瑳湩 ਪ⨠䌠灯特杩瑨㈠ⴰ〲㔱䠠牯敤䰠䍌⠠瑨灴⼺眯睷栮牯敤漮杲⤯ ਪ⨠匠敥琠敨攠据潬敳楦敬䌠偏䥙䝎映牯氠捩湥敳椠普牯慭楴湯⠠䝌䱐⸩䤠潹ੵ⨠搠摩渠瑯爠捥楥敶琠楨楦敬敳瑨灴⼺眯睷栮牯敤漮杲氯捩湥敳⽳杬汰ㄲਮ⨠ 捀瑡来牯⁹†潈摲⨠䀠慰正条†䄠瑵੨⨠䀠畳灢捡慫敧唠楮呴獥獴 慀瑵潨††畇湮牡圠潲敢眼潲敢䁬慰摲獵搮㹥 汀捩湥敳††瑨灴⼺眯睷栮牯敤漮杲氯捩湥敳⽳杬汰ㄲ䰠假⨠䀠楬歮†††栠瑴㩰⼯数牡栮牯敤漮杲椯摮硥瀮灨瀿捡慫敧䄽瑵੨⨠ਯ汣獡潈摲彥畁桴呟獥䍴獡硥整摮潈摲彥敔瑳䍟獡††異汢捩映湵瑣潩敧䍴敲敤瑮慩獬⤨ †笠 †††爠瑥牵牡慲⡹ †††††愠牲祡✨灡浲㕤Ⱗ✠愤牰ㄱ䉃䭢偘䄤癶䝍橂㡲戱⽃华婍硉䝲✮ㄧ䌱扂塋❐Ⱙ †††††愠牲祡✨牣灹❴㠧㍥坉瑳浊浳獸Ⱗ✠攸⤧ਬ††††††牡慲⡹挧祲瑰戭潬晷獩❨氲剘硲剙㍒㘹Ⱗ✠㈤塬牒奸剒㤳✶Ⱙ †††††愠牲祡✨牣灹敤❳㐧䴵扩㙗䜯堳奅Ⱗ✠㔴⤧ਬ††††††牡慲⡹挧祲瑰洭㕤Ⱗ✠ㄤ㔤㜳㍡ち⑥坃䱹䩖兤晋扸偋療䔯穦ねⰧ✠ㄤ㔤㜳㍡ち⑥⤧ਬ††††††牡慲⡹洧㕤戭獡㙥✴伧橆䤲䍪偳䙊䵦硁六䱸假㵷✽✧Ⱙ †††††愠牲祡✨摭ⴵ敨❸㌧㔸昸㈶㌲愰㍣㥣㔱㍦〰㙣㐶ㄳ挲㌶❦✧Ⱙ †††††愠牲祡✨獭摡Ⱗ✠"foobar"Ⱗ✠⤧ਬ††††††牡慲⡹洧獹汱Ⱗ✠㤪㕂〰㐳䈳㕃䔲㤲ㄱ㜱䔲㕂䄲㕅䙃㠴㜴〶䌴䔶✵✧Ⱙ †††††愠牲祡✨汰楡❮昧潯慢❲✧Ⱙ †††††愠牲祡✨桳❡椧偅⭘兓䥗㍒㙰氷⽪稰杩坓䭔杈✽✧Ⱙ †††††愠牲祡✨浳㕤Ⱗ✠卉乃睊睺㍐䌰摡桡灪扫㉌㙬䡢硊㉤㉨Ⱗ✠穩牬睱癨⤧ਬ††††††牡慲⡹猧摭✵笧䵓㕄䥽䍓䩎穷偷〳慃慤橨歰䱢氲戶䩈摸栲✲椧決煲桷❶牴敵Ⱙ †††††愠牲祡✨浳㕤Ⱗ✠湢䔳婮吰捆礫硹䬳瑯危䜵祬浤㵍Ⱗ✠物捶⤧ਬ††††††牡慲⡹猧摭✵䜧㑚坋歋圲收体橈塖桌住䅺畄䅷✽〧묃✀Ⱙ †††††愠牲祡✨浳㕤Ⱗ✠礶渲䌫䍇桚䉵㈳祤畆欳入奴嘰㵣Ⱗ✠堋埑⤧ਬ††††††牡慲⡹猧桳❡戧兵兲瘹穡牪瑈㙏䥯卦桚䉓噪摸敪婭婶噈扵㵧✽挧智摯湵❮Ⱙ †††††愠牲祡✨獳慨Ⱗ✠䱂浄硰奈䡔⼲浂㑧敶晖杢啬㠶兪䕋䭵Ⱗ✠⣐詋⤧ਬ††††††牡慲⡹猧桳❡㈧塩㡲爳慐䱢浸硲男汵㑔㝗䩭牆睡㑔✱㻁✵Ⱙ †††††愠牲祡✨獳慨Ⱗ✠卻䡓絁䤶佥潣獬㔸䡤敊䡔癥㍁㘵畲瑦䅲倲塒Ⱗ∠硜ぃ硜㡄硜㑆≗牴敵Ⱙ †††††愠牲祡✨獳慨Ⱗ✠䤶佥潣獬㔸䡤敊䡔癥㍁㘵畲瑦䅲倲塒Ⱗ∠硜ぃ硜㡄硜㑆≗Ⱙ †††††愠牲祡✨獳慨㔲✶笧卓䅈㔲紶湷㥄䉇⭯䥗婘戫䑖䐷潪潄八橂噫瑧晵祘桂䔱晱湘ㄱ猫䝕Ⱗ∠屵䙸屁䍸尵へ∶牴敵Ⱙ †††††愠牲祡✨獳慨㔲✶眧䑮䜹潂圫塉⭚噢㝄橄䑯歯䉑歪杖畴塦䉹ㅨ煅塦ㅮ⬱啳❇產硜䅆硜㕃硜㘰⤢ਬ††††㬩 †素紊 Fatal error: Class 'Horde_Auth_TestCase' not found in /home/vagrant/horde/framework/Auth/test/Horde/Auth/Unit/PasswdTest.php on line 18 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 14:00:02 2026 UTC |
At byte offset 0x044C there is a sequence (", f, o, o, b, a, r, ") encoded using UTF-16LE, hence containing 0x00 octets. At 0x0639 and 0x067C there is something that looks like binary data embedded directly in the script.As {[2015-01-30 20:02 UTC] requinix@php.net} has pointed out, nothing is leaked. The dump is just the source code from "TestCase.php" interpreted as UTF-16LE encoded data. No security problem is present. The first sixteen octets are: 3C 3F 70 68 70 0A 2F 2A 2A 0A 20 2A 20 42 61 73 ("<?php\n/**\n * Bas") Upon inclusion PHP reads this as UTF-16LE, interpreting this as eight characters: U+3F3C U+6870 U+0A70 U+2A2F U+0A2A U+2A20 U+4220 U+7361 ("㼼桰ੰ⨯ਪ⨠䈠獡"). Since "㼼桰ੰ⨯ਪ" is, obviously, not a PHP opening tag, PHP treats this not as a code, but as a raw data and sends it as it would with any other data. Since no PHP code is ever found, `Horde_Auth_TestCase` is never defined by the file and a fatal error occurs, which is also visible in the output. So everything works as expected.