Compare commits

..

8 Commits

Author SHA1 Message Date
Michael Kaufmann
596075d141 set version to 2.2.0 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2024-08-23 09:22:35 +02:00
Michael Kaufmann
a58a5fd972 correctly get target filename for jqSpeciallogfileNote action call via ajax, fixes #1267
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2024-08-16 09:22:46 +02:00
Michael Kaufmann
bcbfcb34e8 fix typo in varchar length of selector field of new panel_2fa_tokens table, thx to Davidd
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2024-08-14 20:26:18 +02:00
Michael Kaufmann
56d8a565b4 Merge remote-tracking branch 'origin/main' into v2.2 2024-08-14 12:39:03 +02:00
dependabot[bot]
a60c21218c Bump axios from 1.6.0 to 1.7.4 (#1266)
Bumps [axios](https://github.com/axios/axios) from 1.6.0 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.0...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 12:38:33 +02:00
Michael Kaufmann
cd2a08e731 Merge remote-tracking branch 'origin/main' into v2.2 2024-08-14 12:29:27 +02:00
Michael Kaufmann
5d2ce4ecfb allow 60sec discrepancy for email based 2fa; fix dbms version compare issue when removing user; adjust pure-ftpd mysql.conf file permissions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2024-08-12 18:37:38 +02:00
rex2630
869b01204a Add new missing strings + fix typo (#1264) 2024-08-11 21:45:11 +02:00
14 changed files with 45 additions and 21 deletions

View File

@@ -84,7 +84,8 @@ if ($action == '2fa_entercode') {
// verify code set to user's data_2fa field
$sel_stmt = Database::prepare("SELECT `data_2fa` FROM " . $table . " WHERE `" . $field . "` = :uid");
$userinfo_code = Database::pexecute_first($sel_stmt, ['uid' => $uid]);
$result = $tfa->verifyCode($userinfo_code['data_2fa'], $code);
// 60sec discrepancy (possible slow email delivery)
$result = $tfa->verifyCode($userinfo_code['data_2fa'], $code, 60);
} else {
$result = $tfa->verifyCode($_SESSION['secret_2fa'], $code, 3);
}
@@ -393,6 +394,9 @@ if ($action == '2fa_entercode') {
}
exit();
}
// not found or invalid, this cookie is useless, get rid of it
unset($_COOKIE['frx_2fa_remember']);
setcookie('frx_2fa_remember', "", time()-3600);
}
// redirect to code-enter-page

View File

@@ -730,8 +730,8 @@ opcache.validate_timestamps'),
('panel', 'logo_overridecustom', '0'),
('panel', 'settings_mode', '0'),
('panel', 'menu_collapsed', '1'),
('panel', 'version', '2.2.0-rc3'),
('panel', 'db_version', '202407200');
('panel', 'version', '2.2.0'),
('panel', 'db_version', '202408140');
DROP TABLE IF EXISTS `panel_tasks`;
@@ -1054,7 +1054,7 @@ CREATE TABLE `panel_loginlinks` (
DROP TABLE IF EXISTS `panel_2fa_tokens`;
CREATE TABLE `panel_2fa_tokens` (
`id` int(11) NOT NULL auto_increment,
`selector` varchar(20) NOT NULL,
`selector` varchar(200) NOT NULL,
`token` varchar(200) NOT NULL,
`userid` int(11) NOT NULL default '0',
`valid_until` int(15) NOT NULL,

View File

@@ -150,3 +150,17 @@ if (Froxlor::isFroxlorVersion('2.2.0-rc2')) {
Update::showUpdateStep("Updating from 2.2.0-rc2 to 2.2.0-rc3", false);
Froxlor::updateToVersion('2.2.0-rc3');
}
if (Froxlor::isDatabaseVersion('202407200')) {
Update::showUpdateStep("Adjusting field in 2fa-token table");
Database::query("ALTER TABLE `panel_2fa_tokens` CHANGE COLUMN `selector` `selector` varchar(200) NOT NULL;");
Update::lastStepStatus(0);
Froxlor::updateToDbVersion('202408140');
}
if (Froxlor::isFroxlorVersion('2.2.0-rc3')) {
Update::showUpdateStep("Updating from 2.2.0-rc3 to 2.2.0 stable", false);
Froxlor::updateToVersion('2.2.0');
}

View File

@@ -187,7 +187,7 @@ class DbManagerMySQL
*/
public function deleteUser(string $username, string $host)
{
if (Database::getAttribute(PDO::ATTR_SERVER_VERSION) < '5.0.2') {
if (version_compare(Database::getAttribute(PDO::ATTR_SERVER_VERSION), '5.0.2', '<')) {
// Revoke privileges (only required for MySQL 4.1.2 - 5.0.1)
$stmt = Database::prepare("REVOKE ALL PRIVILEGES ON * . * FROM `" . $username . "`@`" . $host . "`");
Database::pexecute($stmt);

View File

@@ -31,10 +31,10 @@ final class Froxlor
{
// Main version variable
const VERSION = '2.2.0-rc3';
const VERSION = '2.2.0';
// Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '202407200';
const DBVERSION = '202408140';
// Distribution branding-tag (used for Debian etc.)
const BRANDING = '';

View File

@@ -3174,7 +3174,7 @@ no
</content>
</file>
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
chmod="0644" backup="true">
chmod="0640" backup="true">
<content><![CDATA[
##############################################
# #

View File

@@ -4742,7 +4742,7 @@ no
</content>
</file>
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
chmod="0644" backup="true">
chmod="0640" backup="true">
<content><![CDATA[
##############################################
# #

View File

@@ -3961,7 +3961,7 @@ no
</content>
</file>
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
chmod="0644" backup="true">
chmod="0640" backup="true">
<content><![CDATA[
##############################################
# #

View File

@@ -3953,7 +3953,7 @@ no
</content>
</file>
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
chmod="0644" backup="true">
chmod="0640" backup="true">
<content><![CDATA[
##############################################
# #

View File

@@ -2628,7 +2628,7 @@ no
</content>
</file>
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
chmod="0644" backup="true">
chmod="0640" backup="true">
<content><![CDATA[
##############################################
# #

View File

@@ -49,6 +49,7 @@ return [
'2fa_ga_desc' => 'Váš účet je nastaven tak, aby používal jednorázová hesla založená na čase prostřednictvím autentizační aplikace. Naskenujte níže uvedený QR kód pomocí požadované autentizační aplikace pro vygenerování kódů. Chcete-li deaktivovat, klikněte na "Deaktivovat 2FA"',
'2fa_not_activated' => 'Dvoufázové ověřování není povoleno',
'2fa_not_activated_for_user' => 'Dvoufaktorové ověření není pro aktuálního uživatele povoleno',
'type_2fa' => 'Stav 2FA',
],
'admin' => [
'overview' => 'Přehled',
@@ -681,6 +682,8 @@ return [
'title' => 'Použít greylisting',
'description' => 'Příchozí e-maily budou chráněny <a href="https://en.wikipedia.org/wiki/Greylisting_(email)" target="_blank">greylisting</a>.<br/>Výchozí: ano'
],
'required_spf_dns' => 'Požadovaný SPF DNS záznam',
'required_dmarc_dns' => 'Požadovaný DMARC DNS záznam',
'required_dkim_dns' => 'Požadovaný DKIM DNS záznam',
],
'dns' => [
@@ -782,6 +785,7 @@ return [
'hsts' => 'HSTS povoleno',
'aliasdomainid' => 'ID aliasové domény',
'nodomainsassignedbyadmin' => 'Váš účet nemá v současné době přiřazeny žádné (aktivní) domény. Pokud si myslíte, že je to špatné, kontaktujte svého správce.',
'email_only' => 'Jen emaily',
],
'emails' => [
'description' => 'Zde můžete vytvářet a měnit své e-mailové adresy.<br />Účet je jako poštovní schránka před vaším domem. Pokud vám někdo pošle e-mail, bude vypuštěn na účet.<br /><br />Chcete-li stáhnout své e-maily, použijte následující nastavení ve vašem poštovním programu: (Data v <i>kurzívě</i> musí být změněna na ekvivalenty, které jste zadali!<br />Hostitelské jméno: <b><i>doménové jméno</i></b><br />Uživatelské jméno: <b><i>jméno účtu / e-mailová adresa</i></b><br />heslo: <b><i>heslo, které jste zvolili</i></b>',
@@ -1101,6 +1105,7 @@ return [
'combination_not_found' => 'Kombinace uživatele a e-mailové adresy nenalezena.',
'2fa' => 'Dvoufázové ověření (2FA)',
'2facode' => 'Zadejte prosím 2FA kód',
'2faremember' => 'Důvěřovat prohlížeči',
],
'mails' => [
'pop_success' => [
@@ -1227,7 +1232,7 @@ Ach upřímně, váš správce',
],
'opcacheinfo' => [
'generaltitle' => 'Obecné informace',
'resetcache' => 'Resetövat OPcache',
'resetcache' => 'Resetovat OPcache',
'version' => 'Verze OPCache',
'phpversion' => 'Verze PHP',
'runtimeconf' => 'Spustitelná konfigurace',
@@ -1941,7 +1946,7 @@ Ach upřímně, váš správce',
],
'documentroot_use_default_value' => [
'title' => 'Použít název domény jako výchozí hodnotu pro cestu kořenového adresáře dokumentu',
'description' => 'Pokud je povoleno a cesta DocumentRoot je prázdná, výchozí hodnotou bude název (sub)domény.<br /><br />Příklady: <br />/var/customers/customer_name/example.com/<br />/var /customers/customer_name/subdomain.example.com/',
'description' => 'Pokud je povoleno a cesta DocumentRoot je prázdná, výchozí hodnotou bude název (sub)domény.<br /><br />Příklady: <br />/var/customers/webs/customer_name/example.com/<br />/var/customers/webs/customer_name/subdomain.example.com/',
],
'panel_phpconfigs_hidesubdomains' => [
'title' => 'Skrýt subdomény v PHP-konfiguračním přehledu',

10
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"@fortawesome/fontawesome-free": "^6.4.2",
"@popperjs/core": "^2.11.8",
"@vitejs/plugin-vue": "^4.0.0",
"axios": "^1.6.0",
"axios": "^1.7.4",
"bootstrap": "^5.3.2",
"chart.js": "^4.4.0",
"jquery": "^3.6.1",
@@ -580,12 +580,12 @@
"dev": true
},
"node_modules/axios": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
"integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
"version": "1.7.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
"dev": true,
"dependencies": {
"follow-redirects": "^1.15.0",
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}

View File

@@ -9,7 +9,7 @@
"@fortawesome/fontawesome-free": "^6.4.2",
"@popperjs/core": "^2.11.8",
"@vitejs/plugin-vue": "^4.0.0",
"axios": "^1.6.0",
"axios": "^1.7.4",
"bootstrap": "^5.3.2",
"chart.js": "^4.4.0",
"jquery": "^3.6.1",

View File

@@ -41,8 +41,9 @@ export default function () {
$('#speciallogfilenote').remove();
$('#speciallogfile').removeClass('is-invalid');
$('#speciallogverified').val(0);
const cFileName = window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);
$.ajax({
url: window.location.pathname.substring(1) + "?page=overview&action=jqSpeciallogfileNote",
url: cFileName + "?page=overview&action=jqSpeciallogfileNote",
type: "POST",
data: {
id: $('input[name=id]').val(), newval: +$('#speciallogfile').is(':checked')