config.inc.php:

- remove the (now superfluous) $CONF['postfix_admin_url'] config option

debian/patches/db_credentials:
- remove the section that sets $CONF['postfix_admin_url']

functions.inc.php - authentication_require_role():
- also remove $CONF['postfix_admin_url'] from comments
- remove the './' part from the redirect

Combined with the previous two commits, this fixes
https://sourceforge.net/tracker/?func=detail&aid=3039042&group_id=191583&atid=937964


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1396 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 14 years ago
parent 89ffcbf25f
commit 57b28f1ae2

@ -29,10 +29,6 @@ $CONF['configured'] = false;
// To create the hash, visit setup.php in a browser and type a password into the field,
// on submission it will be echoed out to you as a hashed value.
$CONF['setup_password'] = 'changeme';
// Postfix Admin Path
// Set the location of your Postfix Admin installation here.
// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
$CONF['postfix_admin_url'] = '';
// Language config
// Language files are located in './languages', change as required..

@ -1,7 +1,7 @@
Description: This patch sets the dbconfig placeholders in config.inc.php.
Forwarded: not-needed
Author: Norman Messtorff <normes@normes.org>
Last-Update: 2011-12-18
Last-Update: 2012-05-28
Index: postfixadmin/config.inc.php
===================================================================
@ -28,15 +28,6 @@ Index: postfixadmin/config.inc.php
// In order to setup Postfixadmin, you MUST specify a hashed password here.
// To create the hash, visit setup.php in a browser and type a password into the field,
@@ -32,7 +37,7 @@
// Postfix Admin Path
// Set the location of your Postfix Admin installation here.
// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
-$CONF['postfix_admin_url'] = '';
+$CONF['postfix_admin_url'] = '/postfixadmin';
// Language config
// Language files are located in './languages', change as required..
@@ -85,11 +90,11 @@
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
// mysqli = MySQL 4.1+

@ -78,8 +78,7 @@ function authentication_has_role($role) {
/**
* Used to enforce that $user has a particular role when
* viewing a page.
* If they are lacking a role, redirect them to
* $CONF['postfix_admin_url']/login.php
* If they are lacking a role, redirect them to login.php
*
* Note, user < admin < global-admin
*/
@ -90,7 +89,7 @@ function authentication_require_role($role) {
return True;
}
header("Location: ./login.php");
header("Location: login.php");
exit(0);
}
/**

Loading…
Cancel
Save