Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions public_html/backend/pages/login.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
}

if (!empty($administrator['last_ip_address']) && $administrator['last_ip_address'] != $_SERVER['REMOTE_ADDR']) {
notices::add('warnings', strtr(t('warning_account_previously_used_by_another_ip', 'Your account was previously used by another IP address {ip_address} ({hostname}). If this was not you then your login credentials might be compromised.'), [
notices::add('warnings', strtr(t('warning_account_previously_used_by_another_ip', 'Your account was previously used by another IP address {ip_address} ({hostname}). If this was not you then y[...]
'{username}' => $administrator['username'],
'{ip_address}' => $administrator['last_ip_address'],
'{hostname}' => $administrator['last_hostname'],
Expand Down Expand Up @@ -159,7 +159,7 @@

unset(session::$data['security.administrator']['verification']);

// TOTP (opt-in per administrator). When enrolled, always challenge
// TOTP (opt-in per administrator). When enrolled, always challenge
// independent of the known-IP check below. Email OTP remains the
// fallback for admins who haven't enrolled.
if (!empty($administrator['totp_secret'])) {
Expand Down Expand Up @@ -241,7 +241,7 @@

if (!empty($_POST['remember_me']) && defined('HMAC_KEY_REMEMBER_ME')) {
$token = f::token_create_remember($administrator['id'], $administrator['password_hash']);
header('Set-Cookie: remember_me='. $token .'; Path='. WS_DIR_APP .'; Expires='. gmdate('r', strtotime('+30 days')) .'; HttpOnly; SameSite=Lax' . (!empty($_SERVER['HTTPS']) ? '; Secure' : ''), false);
header('Set-Cookie: remember_me='. $token .'; Path='. WS_DIR_APP .'; Expires='. gmdate('r', strtotime('+30 days')) .'; HttpOnly; SameSite=Lax' . (!empty($_SERVER['HTTPS']) ? '; Secure' : ''),[...]
} else if (!empty($_COOKIE['remember_me'])) {
header('Set-Cookie: remember_me=; Path='. WS_DIR_APP .'; Max-Age=-1; HttpOnly; SameSite=Lax', false);
}
Expand Down Expand Up @@ -383,4 +383,4 @@
});
});
});
</script>
</script>
20 changes: 10 additions & 10 deletions public_html/storage/addons/countries/vmod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -331,22 +331,22 @@
<operation method="after" type="multiline" onerror="warning">
<find><![CDATA[
case 'color':
return form_input_color($name, $input, $parameters);
return form_input_color($name, $input, $attributes);
]]></find>

<insert><![CDATA[
case 'country':
return form_select_country($name, true, $parameters);
return form_select_country($name, true, $attributes);
]]></insert>
</operation>

<operation method="before" type="multiline" onerror="warning">
<find><![CDATA[
function form_select_encoding($name, $input=true, $parameters='') {
function form_select_encoding(string $name, bool|array|string $input=true, array|string $attributes=[]): string {
]]></find>

<insert><![CDATA[
function form_select_country($name, $input=true, $parameters='') {
function form_select_country($name, $input=true, $attributes='') {

if ($input === true) {
$input = form_reinsert_value($name);
Expand Down Expand Up @@ -376,18 +376,18 @@
});

if (preg_match('#\[\]$#', $name)) {
return form_select_multiple($name, $options, $input, $parameters);
return form_select_multiple($name, $options, $input, $attributes);
} else {
array_unshift($options, ['', '-- '. t('title_select', 'Select') . ' --']);
return form_select($name, $options, $input, $parameters);
return form_select($name, $options, $input, $attributes);
}
}

]]></insert>
</operation>
<operation method="bottom" type="multiline" onerror="warning">
<insert><![CDATA[
function form_select_zone($name, $country_code='', $input=true, $parameters='', $preamble='none') {
function form_select_zone($name, $country_code='', $input=true, $attributes='', $preamble='none') {

switch ($country_code) {

Expand All @@ -409,11 +409,11 @@
});

if (!$options) {
$parameters .= ' disabled';
$attributes .= ' disabled';
}

if (preg_match('#\[\]$#', $name)) {
return form_select_multiple($name, $options, $input, $parameters);
return form_select_multiple($name, $options, $input, $attributes);
}

switch ($preamble) {
Expand All @@ -427,7 +427,7 @@
break;
}

return form_select($name, $options, $input, $parameters);
return form_select($name, $options, $input, $attributes);
}

]]></insert>
Expand Down