Sfoglia il codice sorgente

Fix some recent regressions

Miraty 3 anni fa
parent
commit
f05d1a6764
4 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 2 2
      config.ini
  2. 2 2
      public/auth/login.php
  3. 1 1
      public/auth/logout.php
  4. 1 1
      public/auth/register.php

+ 2 - 2
config.ini

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

+ 2 - 2
public/auth/login.php

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

+ 1 - 1
public/auth/logout.php

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

+ 1 - 1
public/auth/register.php

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