Advanced Search: Small bug fixes and enhancements

SVN:trunk[5636]
This commit is contained in:
Eric Espié
2018-04-12 09:51:32 +00:00
parent d6e7309c34
commit 6dfd44b731
7 changed files with 81 additions and 29 deletions

View File

@@ -131,6 +131,15 @@ try
// note: transform to cope with XSS attacks
echo '<html><head></head><body><div>' . htmlentities($e->GetMessage(), ENT_QUOTES, 'utf-8') . '</div></body></html>';
IssueLog::Error($e->getMessage()."\nDebug trace:\n".$e->getTraceAsString());
} catch (MySQLException $e)
{
http_response_code(500);
// Sanytize error:
$sMsg = $e->GetMessage();
$sMsg = preg_replace("@^.* mysql_error = @", '', $sMsg);
// note: transform to cope with XSS attacks
echo '<html><head></head><body><div>'.htmlentities($sMsg, ENT_QUOTES, 'utf-8').'</div></body></html>';
IssueLog::Error($e->getMessage()."\nDebug trace:\n".$e->getTraceAsString());
} catch (Exception $e)
{
http_response_code(500);