diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-06-19 17:24:55 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-06-20 16:59:51 +0200 |
commit | 902c649dad7a0bd1f5f2d0ec87953f0f059a67d8 (patch) | |
tree | c921524cd92be48789387552ced4688b39550c5d | |
parent | d9607df26f63a60b7047d078876e004689190707 (diff) | |
download | nextcloud-server-902c649dad7a0bd1f5f2d0ec87953f0f059a67d8.tar.gz nextcloud-server-902c649dad7a0bd1f5f2d0ec87953f0f059a67d8.zip |
use new sanitize HTML function backported
Conflicts:
lib/template.php
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | lib/template.php | 1 | ||||
-rw-r--r-- | settings/admin.php | 2 | ||||
-rw-r--r-- | settings/ajax/getlog.php | 2 | ||||
-rw-r--r-- | settings/js/log.js | 2 |
5 files changed, 5 insertions, 4 deletions
diff --git a/index.php b/index.php index 4df62327c47..3c38ff760f8 100644 --- a/index.php +++ b/index.php @@ -118,7 +118,7 @@ elseif(OC_User::isLoggedIn()) { if(!array_key_exists('sectoken', $_SESSION) || (array_key_exists('sectoken', $_SESSION) && is_null(OC::$REQUESTEDFILE)) || substr(OC::$REQUESTEDFILE, -3) == 'php'){ $sectoken=rand(1000000,9999999); $_SESSION['sectoken']=$sectoken; - $redirect_url = (isset($_REQUEST['redirect_url'])) ? strip_tags($_REQUEST['redirect_url']) : $_SERVER['REQUEST_URI']; + $redirect_url = (isset($_REQUEST['redirect_url'])) ? OC_Util::sanitizeHTML($_REQUEST['redirect_url']) : $_SERVER['REQUEST_URI']; OC_Template::printGuestPage('', 'login', array('error' => $error, 'sectoken' => $sectoken, 'redirect' => $redirect_url)); } } diff --git a/lib/template.php b/lib/template.php index fd2cb34a4a9..dd5dbad4a99 100644 --- a/lib/template.php +++ b/lib/template.php @@ -268,6 +268,7 @@ class OC_Template{ * * If the key existed before, it will be overwritten */ + public function assign( $key, $value ){ $this->vars[$key] = $value; return true; diff --git a/settings/admin.php b/settings/admin.php index a997bad4e3c..88aae5bdb60 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -23,7 +23,7 @@ function compareEntries($a,$b){ usort($entries, 'compareEntries'); $tmpl->assign('loglevel',OC_Config::getValue( "loglevel", 2 )); -$tmpl->assign('entries',$entries); +$tmpl->assign('entries',OC_Util::sanitizeHTML($entries)); $tmpl->assign('forms',array()); foreach($forms as $form){ $tmpl->append('forms',$form); diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index ed48b2cae1a..d9e80de37ba 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -14,4 +14,4 @@ $count=(isset($_GET['count']))?$_GET['count']:50; $offset=(isset($_GET['offset']))?$_GET['offset']:0; $entries=OC_Log_Owncloud::getEntries($count,$offset); -OC_JSON::success(array("data" => $entries)); +OC_JSON::success(array("data" => OC_Util::sanitizeHTML($entries))); diff --git a/settings/js/log.js b/settings/js/log.js index bde8b8b104c..6063c7d9a9f 100644 --- a/settings/js/log.js +++ b/settings/js/log.js @@ -39,7 +39,7 @@ OC.Log={ row.append(appTd); var messageTd=$('<td/>'); - messageTd.text(entry.message.replace(/</, "<").replace(/>/, ">")); + messageTd.text(entry.message); row.append(messageTd); var timeTd=$('<td/>'); |