mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
Add original "access denied" error to access-denied.php
This commit is contained in:
parent
ee71bcc1b9
commit
db4f0c3d80
@ -16,6 +16,22 @@
|
||||
The web interface was unable to connect to the database using the configuration provided.
|
||||
<br>
|
||||
Database error: Access denied
|
||||
<br>
|
||||
<?php
|
||||
if (isset($_GET['error'])) {
|
||||
$error = $_GET['error'];
|
||||
if (strlen($error) <= 1024) {
|
||||
$error = base64_decode($error, true);
|
||||
|
||||
if ($error !== false) {
|
||||
// sanitize user input
|
||||
$error = htmlspecialchars($error, ENT_QUOTES, "UTF-8");
|
||||
|
||||
echo $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br>
|
||||
<a href="../" class="btn btn-default">Try Again</a>
|
||||
|
@ -130,7 +130,7 @@ final class Settings {
|
||||
$message = $e->getMessage();
|
||||
if ($settings->error_pages) {
|
||||
if (strstr($message, "Access denied for user")) {
|
||||
$settings->redirect("error/access-denied.php");
|
||||
$settings->redirect("error/access-denied.php?error=" . base64_encode($message));
|
||||
}
|
||||
if (strstr($message, "Base table or view not found:")) {
|
||||
$settings->redirect("error/tables-not-found.php");
|
||||
|
Loading…
x
Reference in New Issue
Block a user