Skip to content
Snippets Groups Projects
Commit cfb10dc5 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Add warning about sanitization

parent 630ee644
Branches
No related tags found
No related merge requests found
...@@ -519,12 +519,13 @@ class OC_Template{ ...@@ -519,12 +519,13 @@ class OC_Template{
/** /**
* @brief Print a fatal error page and terminates the script * @brief Print a fatal error page and terminates the script
* @param string $error The error message to show * @param string $error The error message to show
* @param string $hint An option hint message * @param string $hint An optional hint message
* Warning: All data passed to $hint needs to get sanitized using OC_Util::sanitizeHTML
*/ */
public static function printErrorPage( $error_msg, $hint = '' ) { public static function printErrorPage( $error_msg, $hint = '' ) {
$content = new OC_Template( '', 'error', 'error' ); $content = new OC_Template( '', 'error', 'error' );
$errors = array(array('error' => $error_msg, 'hint' => $hint)); $errors = array(array('error' => $error_msg, 'hint' => $hint));
$content->assign( 'errors', $errors, false ); $content->assign( 'errors', $errors );
$content->printPage(); $content->printPage();
die(); die();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment