Bug #10428

Wrong Namespace scope when using PhpFrontend

Added by Robert Lemke almost 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-10-25
Priority:Should have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:Cache
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 13
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

The

__halt_compiler()
instruction in combination with the require mechanism used by the PhpFrontend can cause classes originally being in a global scope to be loaded in the namespace of the last class which has been loaded by the PhpFrontend.

This seems to be a bug in PHP, but until now we were not able to isolate it and write a separate exploit.

bug_10428.zip (2.3 kB) Christopher Hlubek, 2010-10-25 13:53


Related issues

related to TYPO3.Neos - Task #10426: Implement functional testing support in the Testing package Resolved

Associated revisions

Revision 24362dc5
Added by Robert Lemke almost 5 years ago

[+BUGFIX] FLOW3 (Cache): Work around PHP __halt_compiler() namespaces bug

The PhpFrontend added a __halt_compiler() instruction to the end of each
cache file to ignore following meta data needed by the cache framework.
This resulted in wrong namespace scopes for certain - originally global -
classes.

Instead of __halt_compiler() we now use a simple "#" comment which should
work equally fine with the current kind of metadata we are using.

Change-Id: I698c15e1053ae87337bb3c914c9c98de35a2e536
Resolves: #10428

History

#1 Updated by Christopher Hlubek almost 5 years ago

I created a simple test case where the problem can be reproduced.

#2 Updated by Robert Lemke almost 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF