X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fsecurity.php;h=af201d2af1853afd41284ee5306e49d6fe9500ea;hb=db5fe142411ffb75aab31f7b4fe20bfaba5e77b0;hp=66622fd331c987fad37580402ae4066d71b5496a;hpb=4bee1859be5fbf46ecc19728a908e31b4e9b09b6;p=friendica.git diff --git a/include/security.php b/include/security.php old mode 100644 new mode 100755 index 66622fd331..af201d2af1 --- a/include/security.php +++ b/include/security.php @@ -76,7 +76,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"'); if($login_initial) { - $l = get_language(); + $l = get_browser_language(); q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d LIMIT 1", dbesc(datetime_convert()), @@ -326,7 +326,7 @@ function check_form_security_token($typename = '', $formname = 'form_security_to } function check_form_security_std_err_msg() { - return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it.') . EOL; + return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it.') . EOL; } function check_form_security_token_redirectOnErr($err_redirect, $typename = '', $formname = 'form_security_token') { if (!check_form_security_token($typename, $formname)) { @@ -339,9 +339,10 @@ function check_form_security_token_redirectOnErr($err_redirect, $typename = '', } function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'form_security_token') { if (!check_form_security_token($typename, $formname)) { + $a = get_app(); logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename); logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA); header('HTTP/1.1 403 Forbidden'); killme(); } -} \ No newline at end of file +}