Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4183b020b | ||
|
|
9a3d88e8c9 | ||
|
|
c9460fd58f | ||
|
|
6ef532b470 | ||
|
|
5909401cdd |
@@ -35,6 +35,7 @@ return [
|
||||
'varname' => 'sessiontimeout',
|
||||
'type' => 'number',
|
||||
'min' => 60,
|
||||
'max' => 31536000,
|
||||
'default' => 600,
|
||||
'save_method' => 'storeSettingField'
|
||||
],
|
||||
|
||||
@@ -142,8 +142,10 @@ if (($page == 'ipsandports' || $page == 'overview') && $userinfo['change_servers
|
||||
}
|
||||
} elseif ($action == 'jqCheckIP') {
|
||||
$ip = $_POST['ip'] ?? "";
|
||||
if ((filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) || filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE) == false) {
|
||||
// returns notice if private network detected so we can display it
|
||||
if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) {
|
||||
echo json_encode('<div id="ipnote" class="invalid-feedback">'.lng('error.invalidip', [$ip]).'</div>');
|
||||
} elseif (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE)) {
|
||||
// returns notice if private network detected, so we can display it
|
||||
echo json_encode(lng('admin.ipsandports.ipnote'));
|
||||
} else {
|
||||
echo 0;
|
||||
|
||||
@@ -726,7 +726,7 @@ opcache.validate_timestamps'),
|
||||
('panel', 'logo_overridecustom', '0'),
|
||||
('panel', 'settings_mode', '0'),
|
||||
('panel', 'menu_collapsed', '1'),
|
||||
('panel', 'version', '2.1.7'),
|
||||
('panel', 'version', '2.1.8'),
|
||||
('panel', 'db_version', '202312120');
|
||||
|
||||
|
||||
|
||||
@@ -294,3 +294,8 @@ if (Froxlor::isFroxlorVersion('2.1.6')) {
|
||||
Update::showUpdateStep("Updating from 2.1.6 to 2.1.7", false);
|
||||
Froxlor::updateToVersion('2.1.7');
|
||||
}
|
||||
|
||||
if (Froxlor::isFroxlorVersion('2.1.7')) {
|
||||
Update::showUpdateStep("Updating from 2.1.7 to 2.1.8", false);
|
||||
Froxlor::updateToVersion('2.1.8');
|
||||
}
|
||||
|
||||
@@ -823,6 +823,7 @@ class Apache extends HttpConfigBase
|
||||
$modrew_red = ' [R=' . $code . ';L,NE]';
|
||||
}
|
||||
|
||||
$vhost_content .= $this->getLogfiles($domain);
|
||||
// redirect everything, not only root-directory, #541
|
||||
$vhost_content .= ' <IfModule mod_rewrite.c>' . "\n";
|
||||
$vhost_content .= ' RewriteEngine On' . "\n";
|
||||
|
||||
@@ -406,6 +406,7 @@ class Lighttpd extends HttpConfigBase
|
||||
// Get domain's redirect code
|
||||
$code = Domain::getDomainRedirectCode($domain['id']);
|
||||
|
||||
$vhost_content .= $this->getLogFiles($domain);
|
||||
$vhost_content .= ' url.redirect-code = ' . $code . "\n";
|
||||
$vhost_content .= ' url.redirect = (' . "\n";
|
||||
$vhost_content .= ' "^/(.*)$" => "' . $uri . '$1"' . "\n";
|
||||
|
||||
@@ -586,6 +586,7 @@ class Nginx extends HttpConfigBase
|
||||
// Get domain's redirect code
|
||||
$code = Domain::getDomainRedirectCode($domain['id']);
|
||||
|
||||
$vhost_content .= $this->getLogFiles($domain);
|
||||
$vhost_content .= "\t" . 'location / {' . "\n";
|
||||
$vhost_content .= "\t\t" . 'return ' . $code . ' ' . $uri . '$request_uri;' . "\n";
|
||||
$vhost_content .= "\t" . '}' . "\n";
|
||||
|
||||
@@ -31,7 +31,7 @@ final class Froxlor
|
||||
{
|
||||
|
||||
// Main version variable
|
||||
const VERSION = '2.1.7';
|
||||
const VERSION = '2.1.8';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '202312120';
|
||||
|
||||
@@ -369,7 +369,7 @@ if (CurrentUser::hasSession()) {
|
||||
}
|
||||
// update cookie lifetime
|
||||
$cookie_params = [
|
||||
'expires' => time() + Settings::Get('session.sessiontimeout'),
|
||||
'expires' => time() + min(Settings::Get('session.sessiontimeout'), 31536000),
|
||||
'path' => '/',
|
||||
'domain' => UI::getCookieHost(),
|
||||
'secure' => UI::requestIsHttps(),
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function () {
|
||||
planid: pid
|
||||
},
|
||||
dataType: "json",
|
||||
beforeSend: function(request) {
|
||||
beforeSend: function (request) {
|
||||
request.setRequestHeader('X-CSRF-TOKEN', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
|
||||
},
|
||||
success: function (json) {
|
||||
|
||||
@@ -13,6 +13,9 @@ export default function () {
|
||||
customerid: cid
|
||||
},
|
||||
dataType: "json",
|
||||
beforeSend: function (request) {
|
||||
request.setRequestHeader('X-CSRF-TOKEN', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
|
||||
},
|
||||
success: function (json) {
|
||||
if (json.length > 0) {
|
||||
$('#phpsettingid option').each(function () {
|
||||
@@ -45,6 +48,10 @@ export default function () {
|
||||
id: $('input[name=id]').val(), newval: +$('#speciallogfile').is(':checked')
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
beforeSend: function (request) {
|
||||
request.setRequestHeader('X-CSRF-TOKEN', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
|
||||
},
|
||||
success: function (json) {
|
||||
if (json.changed) {
|
||||
$('#speciallogfile').addClass('is-invalid');
|
||||
|
||||
@@ -15,6 +15,9 @@ export default function () {
|
||||
ip: ipval
|
||||
},
|
||||
dataType: "json",
|
||||
beforeSend: function (request) {
|
||||
request.setRequestHeader('X-CSRF-TOKEN', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
|
||||
},
|
||||
success: function (json) {
|
||||
if (json != 0) {
|
||||
$('#ip').addClass('is-invalid');
|
||||
|
||||
Reference in New Issue
Block a user