aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-02-09 04:37:12 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-02-09 04:37:12 +0000
commit78def4201a4fbfc8f8d1f915d2c7820d2fb54d23 (patch)
tree5ae835da94d43b6946f46b7ec122d8eed4009a8c /functions/template.php
parent33a44daad5e809ee4678c9389789c31130c1be1d (diff)
downloadphpicalendar-78def4201a4fbfc8f8d1f915d2c7820d2fb54d23.tar.gz
phpicalendar-78def4201a4fbfc8f8d1f915d2c7820d2fb54d23.tar.bz2
phpicalendar-78def4201a4fbfc8f8d1f915d2c7820d2fb54d23.zip
Sanitize file in parse function
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/functions/template.php b/functions/template.php
index cb2431f..8f477c9 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -1034,11 +1034,17 @@ class Page {
}
function parse($file) {
+ global $template;
ob_start();
+ $file = str_replace("..","",$file);
+ if (strpos($file, "$template") > 0 || $file =='./functions/event.js'){
include($file);
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
+ }else{
+ die('breakin attempt');
+ }
}
function replace_tags($tags = array()) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy