Fix some recent regressions

This commit is contained in:
Miraty 2022-05-20 01:08:40 +02:00
parent c87e9372cb
commit f05d1a6764
4 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,6 @@
root_path = "/srv/php/niver"
; Prefix in URL, if any
prefix =
ht_path = "/srv/ht"
; From RFC2606: Reserved Top Level DNS Names > 2. TLDs for Testing, & Documentation Examples
domain_example = "example"
; From RFC3849: IPv6 Address Prefix Reserved for Documentation
@ -12,7 +11,7 @@ ipv4_example = "203.0.113.42"
[reg]
knotc_path = "/usr/sbin/knotc"
registry = niver.test
registry = niver.test.
subdomain_regex = "^[a-z0-9]{4,63}$"
[ns]
@ -20,6 +19,7 @@ knotc_path = "/usr/sbin/knotc"
knot_zones_path = "/srv/ns"
[ht]
ht_path = "/srv/ht"
ipv6_address = "::1"
ipv4_address = "127.0.0.1"
sftp_domain = "sftp.niver.test"

View File

@ -35,11 +35,11 @@ if (isset($_POST['username']) AND isset($_POST['password'])) {
if (isset($_GET['redir'])) {
if (preg_match("/^[0-9a-z\/-]+$/", $_GET['redir']))
header("Location: " . PREFIX . "/" . $_GET['redir']);
header("Location: " . CONF['common']['prefix'] . "/" . $_GET['redir']);
else
exit("ERROR : Wrong character in redir argument");
} else {
header("Location: " . PREFIX . "/");
header("Location: " . CONF['common']['prefix'] . "/");
}
exit;
} else {

View File

@ -3,7 +3,7 @@
<?php
session_destroy();
header('Clear-Site-Data: "*"');
header('Location: ' . PREFIX . '/auth/');
header('Location: ' . CONF['common']['prefix'] . '/auth/');
exit;
?>

View File

@ -40,7 +40,7 @@ if (isset($_POST['username']) AND isset($_POST['password'])) {
$_SESSION['username'] = $username;
$_SESSION['sftp_enabled'] = false;
header('Location: ' . PREFIX . '/');
header('Location: ' . CONF['common']['prefix'] . '/');
exit;
}