mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +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.
|
The web interface was unable to connect to the database using the configuration provided.
|
||||||
<br>
|
<br>
|
||||||
Database error: Access denied
|
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>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<a href="../" class="btn btn-default">Try Again</a>
|
<a href="../" class="btn btn-default">Try Again</a>
|
||||||
|
@ -130,7 +130,7 @@ final class Settings {
|
|||||||
$message = $e->getMessage();
|
$message = $e->getMessage();
|
||||||
if ($settings->error_pages) {
|
if ($settings->error_pages) {
|
||||||
if (strstr($message, "Access denied for user")) {
|
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:")) {
|
if (strstr($message, "Base table or view not found:")) {
|
||||||
$settings->redirect("error/tables-not-found.php");
|
$settings->redirect("error/tables-not-found.php");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user