Skip to content

Commit e8f9436

Browse files
author
Marius Cramer
committed
- fixed csrf protection
1 parent 582cbf7 commit e8f9436

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

interface/lib/classes/tform.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ function encode($record, $tab, $dbencode = true) {
680680
}
681681
if($_csrf_valid !== true) {
682682
$app->log('CSRF attempt blocked. Referer: ' . (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown'), LOGLEVEL_WARN);
683+
$errmsg = 'err_csrf_attempt_blocked';
684+
$this->errorMessage .= ($api == true ? $errmsg : $this->wordbook[$errmsg]."<br />") . "\r\n";
683685
unset($_POST);
684686
unset($record);
685687
}

interface/lib/lang/de.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ $wb['top_menu_domain'] = 'Domains';
4242
$wb['top_menu_dashboard'] = 'Übersicht';
4343
$wb['latest_news_txt'] = 'Neuigkeiten';
4444
$wb['top_menu_vm'] = 'vServer';
45+
$wb['err_csrf_attempt_blocked'] = 'CSRF-Versuch blockiert.';
4546
$wb['daynamesmin_su'] = 'So';
4647
$wb['daynamesmin_mo'] = 'Mo';
4748
$wb['daynamesmin_tu'] = 'Di';

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)