Skip to content

Commit 352477d

Browse files
author
Marius Cramer
committed
- fixed csrf protection
1 parent 985390f commit 352477d

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

interface/lib/classes/tform_base.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ protected function _encode($record, $tab, $dbencode = true, $api = false) {
709709
}
710710
if($_csrf_valid !== true) {
711711
$app->log('CSRF attempt blocked. Referer: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown'), LOGLEVEL_WARN);
712+
$errmsg = 'err_csrf_attempt_blocked';
713+
$this->errorMessage .= ($api == true ? $errmsg : $this->wordbook[$errmsg]."<br />") . "\r\n";
712714
unset($_POST);
713715
unset($record);
714716
}

interface/lib/lang/de.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ $wb['top_menu_mailuser'] = 'E-Mail Benutzer';
4141
$wb['top_menu_domain'] = 'Domains';
4242
$wb['top_menu_dashboard'] = 'Übersicht';
4343
$wb['latest_news_txt'] = 'Neuigkeiten';
44+
$wb['err_csrf_attempt_blocked'] = 'CSRF-Versuch blockiert.';
4445
$wb['top_menu_vm'] = 'vServer';
4546
$wb['daynamesmin_su'] = 'So';
4647
$wb['daynamesmin_mo'] = 'Mo';

interface/lib/lang/en.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ $wb['datalog_status_d_web_folder'] = 'Delete folder protection';
131131
$wb['datalog_status_i_web_folder_user'] = 'Create folder protection user';
132132
$wb['datalog_status_u_web_folder_user'] = 'Update folder protection user';
133133
$wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
134+
$wb['err_csrf_attempt_blocked'] = 'CSRF attempt blocked.';
134135
$wb['login_as_txt'] = 'Log in as';
135136
$wb["no_domain_perm"] = 'You have no permission for this domain.';
136137
$wb["no_destination_perm"] = 'You have no permission for this destination.';

0 commit comments

Comments
 (0)