Skip to content

Commit

Permalink
Sanitize views in exception
Browse files Browse the repository at this point in the history
  • Loading branch information
joanhey committed Jun 17, 2020
1 parent f5e4137 commit 68fbd36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion core/kumbia/kumbia_exception.php
Expand Up @@ -71,7 +71,12 @@ public static function handleException($e)
// show developer info in development
self::showDev($e);
}


/**
* Maneja las excepciones no capturadas.
*
* @param Exception|KumbiaException $e
* */
private static function showDev($e)
{
$data = Router::get();
Expand Down
4 changes: 2 additions & 2 deletions core/views/errors/no_partial.phtml
@@ -1,8 +1,8 @@
<div class="flash error">
<h1><?= $e->getMessage() ?></h1>
<h1><?= h($e->getMessage()) ?></h1>
</div>
<div class="flash valid">
<h1>Solución</h1>
<h4><strong>Crea el partial en el fichero : <br>
<em class="file"><?= APP_PATH, 'views/_shared/partials/', View::getPath()?></em></strong></h4>
<em class="file"><?= APP_PATH, 'views/_shared/partials/', h(View::getPath())?></em></strong></h4>
</div>
2 changes: 1 addition & 1 deletion core/views/errors/no_view.phtml
@@ -1,5 +1,5 @@
<div class="flash error">
<h1><?= $e->getMessage() ?></h1>
<h1><?= h($e->getMessage()) ?></h1>
</div>
<div class="flash valid">
<h1>Solución</h1>
Expand Down

0 comments on commit 68fbd36

Please sign in to comment.