Better error message

This commit is contained in:
Laurent Destailleur 2022-02-04 19:21:47 +01:00
parent 1e94ffa4d2
commit c9a685e09d
3 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,8 @@ if (empty($conf) || !is_object($conf)) {
$size = (int) $_SERVER['CONTENT_LENGTH'];
if ($size > 10000) {
http_response_code(413);
$langs->loadLangs(array("errors", "install"));
accessforbidden('<center>'.$langs->trans("ErrorRequestTooLarge").'.<br><a href="'.DOL_URL_ROOT.'">'.$langs->trans("ClickHereToGoToApp").'</a></center>', 0, 0, 1);
exit;
}

View File

@ -31,6 +31,8 @@ if (empty($conf) || !is_object($conf)) {
$size = (int) $_SERVER['CONTENT_LENGTH'];
if ($size > 10000) {
http_response_code(413);
$langs->loadLangs(array("errors", "install"));
accessforbidden('<center>'.$langs->trans("ErrorRequestTooLarge").'<br><a href="'.DOL_URL_ROOT.'">'.$langs->trans("ClickHereToGoToApp").'</a></center>', 0, 0, 1);
exit;
}

View File

@ -276,6 +276,7 @@ ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please mo
ErrorIsNotADraft=%s is not a draft
ErrorExecIdFailed=Can't execute command "id"
ErrorBadCharIntoLoginName=Unauthorized character in the login name
ErrorRequestTooLarge=Error, request too large
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.