mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Remove usage of $CONF['postfix_admin_url'] in various Location: headers
to avoid problems with wrong values of $CONF['postfix_admin_url']. https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3039042&group_id=191583 contains the technical details and reasons. Note: $CONF['postfix_admin_url'] is still used at some places that are a bit harder to change. git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1021 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
b89b94cf83
commit
d66262f00e
@ -25,7 +25,7 @@ require_once('common.php');
|
|||||||
|
|
||||||
authentication_require_role('global-admin');
|
authentication_require_role('global-admin');
|
||||||
|
|
||||||
(($CONF['backup'] == 'NO') ? header("Location: " . $CONF['postfix_admin_url'] . "/main.php") && exit : '1');
|
(($CONF['backup'] == 'NO') ? header("Location: main.php") && exit : '1');
|
||||||
|
|
||||||
// TODO: make backup supported for postgres
|
// TODO: make backup supported for postgres
|
||||||
if ('pgsql'==$CONF['database_type'])
|
if ('pgsql'==$CONF['database_type'])
|
||||||
|
@ -31,7 +31,7 @@ require_once('common.php');
|
|||||||
authentication_require_role('global-admin');
|
authentication_require_role('global-admin');
|
||||||
|
|
||||||
if ($CONF['sendmail'] != 'YES') {
|
if ($CONF['sendmail'] != 'YES') {
|
||||||
header("Location: " . $CONF['postfix_admin_url'] . "/main.php");
|
header("Location: main.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ require_once('common.php');
|
|||||||
authentication_require_role('admin');
|
authentication_require_role('admin');
|
||||||
|
|
||||||
if (!boolconf('alias_domain')) {
|
if (!boolconf('alias_domain')) {
|
||||||
header("Location: " . $CONF['postfix_admin_url'] . "/main.php");
|
header("Location: main.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
|||||||
|
|
||||||
flash_info($PALANG['pCreate_alias_domain_success']);
|
flash_info($PALANG['pCreate_alias_domain_success']);
|
||||||
# we would have to update the list of domains available for aliasing. Doing a redirect is easier.
|
# we would have to update the list of domains available for aliasing. Doing a redirect is easier.
|
||||||
header("Location: " . $CONF['postfix_admin_url'] . "/create-alias-domain.php");
|
header("Location: create-alias-domain.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
require_once('common.php');
|
require_once('common.php');
|
||||||
|
|
||||||
if($CONF['vacation'] == 'NO') {
|
if($CONF['vacation'] == 'NO') {
|
||||||
header("Location: " . $CONF['postfix_admin_url'] . "/list-virtual.php");
|
header("Location: list-virtual.php");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ $vacation_domain = $CONF['vacation_domain'];
|
|||||||
$vacation_goto = preg_replace('/@/', '#', $fUsername);
|
$vacation_goto = preg_replace('/@/', '#', $fUsername);
|
||||||
$vacation_goto = $vacation_goto . '@' . $vacation_domain;
|
$vacation_goto = $vacation_goto . '@' . $vacation_domain;
|
||||||
|
|
||||||
$fCanceltarget = $CONF['postfix_admin_url'] . "/list-virtual.php?domain=$fDomain";
|
$fCanceltarget = "list-virtual.php?domain=$fDomain";
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] == "GET")
|
if ($_SERVER['REQUEST_METHOD'] == "GET")
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ function authentication_get_username()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_SESSION['sessid'])) {
|
if (!isset($_SESSION['sessid'])) {
|
||||||
header ("Location: " . $CONF['postfix_admin_url'] . "/login.php");
|
header ("Location: login.php");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
$SESSID_USERNAME = $_SESSION['sessid']['username'];
|
$SESSID_USERNAME = $_SESSION['sessid']['username'];
|
||||||
|
@ -34,7 +34,7 @@ require_once('common.php');
|
|||||||
|
|
||||||
authentication_require_role('admin');
|
authentication_require_role('admin');
|
||||||
|
|
||||||
(($CONF['sendmail'] == 'NO') ? header("Location: " . $CONF['postfix_admin_url'] . "/main.php") && exit : '1');
|
(($CONF['sendmail'] == 'NO') ? header("Location: main.php") && exit : '1');
|
||||||
|
|
||||||
$SESSID_USERNAME = authentication_get_username();
|
$SESSID_USERNAME = authentication_get_username();
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ $USERID_USERNAME = authentication_get_username();
|
|||||||
|
|
||||||
// is vacation support enabled in $CONF ?
|
// is vacation support enabled in $CONF ?
|
||||||
if($CONF['vacation'] == 'NO') {
|
if($CONF['vacation'] == 'NO') {
|
||||||
header("Location: " . $CONF['postfix_admin_url'] . "/users/main.php");
|
header("Location: main.php");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user