Created
January 15, 2016 18:58
-
-
Save huanga/1e38fc0dd3d8c362ea58 to your computer and use it in GitHub Desktop.
POC workaround for the eval on: https://gist.github.com/edhaase/ad6fcafb437fbd83ed33#file-twigapcucache-php-L35 Note: This requires allow_url_include to be set to 1 in php.ini, which is less than ideal unless you have control of the entire code base, including libraries brought in via Composer; because you can never be too certain what third par…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$content['data'] = <<< ENDOFCACHE | |
<?php | |
class __TwigTemplate_4a6b76b264f297385591d11dab293ca7beedbe9b3753afa9039645fcaaf2c301 | |
{ | |
function __construct() { | |
echo 'loaded properly'; | |
} | |
} | |
ENDOFCACHE; | |
@include "data://text/plain;base64,".base64_encode($content['data']); | |
$test = new __TwigTemplate_4a6b76b264f297385591d11dab293ca7beedbe9b3753afa9039645fcaaf2c301(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment