Skip to content

Commit

Permalink
adjust spf-entry-regex; check for valid spf-entry in updater; set ver…
Browse files Browse the repository at this point in the history
…sion to 2.1.0-rc2

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Nov 11, 2023
1 parent 287ad84 commit d52f33a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actions/admin/settings/185.spf.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'settinggroup' => 'spf',
'varname' => 'spf_entry',
'type' => 'text',
'string_regexp' => '/^v=spf[a-z0-9:~?\s\.-]+$/i',
'string_regexp' => '/^v=spf[a-z0-9:~?\s.-]+$/i',
'default' => 'v=spf1 a mx -all',
'save_method' => 'storeSettingField'
]
Expand Down
6 changes: 3 additions & 3 deletions install/froxlor.sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
('admin', 'show_version_footer', '0'),
('caa', 'caa_entry', ''),
('spf', 'use_spf', '0'),
('spf', 'spf_entry', '"v=spf1 a mx -all"'),
('spf', 'spf_entry', 'v=spf1 a mx -all'),
('dkim', 'dkim_algorithm', 'all'),
('dkim', 'dkim_keylength', '1024'),
('dkim', 'dkim_servicetype', '0'),
Expand Down Expand Up @@ -679,7 +679,7 @@
('system', 'distribution', ''),
('system', 'update_channel', 'stable'),
('system', 'updatecheck_data', ''),
('system', 'update_notify_last', '2.1.0-rc1'),
('system', 'update_notify_last', '2.1.0-rc2'),
('system', 'traffictool', 'goaccess'),
('system', 'req_limit_per_interval', 60),
('system', 'req_limit_interval', 60),
Expand Down Expand Up @@ -727,7 +727,7 @@
('panel', 'logo_overridecustom', '0'),
('panel', 'settings_mode', '0'),
('panel', 'menu_collapsed', '1'),
('panel', 'version', '2.1.0-rc1'),
('panel', 'version', '2.1.0-rc2'),
('panel', 'db_version', '202305240');
Expand Down
15 changes: 15 additions & 0 deletions install/updates/froxlor/update_2.1.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,18 @@
Update::showUpdateStep("Updating from 2.1.0-beta2 to 2.1.0-rc1", false);
Froxlor::updateToVersion('2.1.0-rc1');
}

if (Froxlor::isFroxlorVersion('2.1.0-rc1')) {
Update::showUpdateStep("Updating from 2.1.0-rc1 to 2.1.0-rc2", false);

Update::showUpdateStep("Adjusting setting spf_entry");
$spf_entry = Settings::Get('spf.spf_entry');
if (!preg_match('/^v=spf[a-z0-9:~?\s.-]+$/i', $spf_entry)) {
Settings::Set('spf.spf_entry', 'v=spf1 a mx -all');
Update::lastStepStatus(1, 'corrected');
} else {
Update::lastStepStatus(0);
}

Froxlor::updateToVersion('2.1.0-rc2');
}
2 changes: 1 addition & 1 deletion lib/Froxlor/Froxlor.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class Froxlor
{

// Main version variable
const VERSION = '2.1.0-rc1';
const VERSION = '2.1.0-rc2';

// Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '202305240';
Expand Down

0 comments on commit d52f33a

Please sign in to comment.