Commit Graph

8 Commits (161c9b1ed2c218ea4f2ad641ff0d9db23e4fc2bc)

Author SHA1 Message Date
Christian Boltz 9f2a0db106 create_admin() cleanup
functions.inc.php:
- create_admin(): use db_insert instead of INSERT queries
  (this includes automatic escaping of all values)

create-admin.php:
- use safepost instead of isset($_POST[...])
- don't escape_string post values - it's done inside create_admin now
- remove superfluous emptying of empty $tDomains for GET
- allow htmlentities-escaping for pAdminCreate_admin_username_text
- some whitespace / linebreak changes

setup.php:
- load config.inc.php only once (loading it twice will break if custom
  hook functions exist in config.*.php - "can't redefine function ...")
- use safepost instead of isset($_POST[...])
- don't escape_string post values - it's done inside create_admin now
- escape $tUsername with htmlentities() instead of escape_string



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1190 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 9d1f79c495 create-admin.php:
- fix SQL injection (only exploitable by superadmins)

Reported by Matthias Bethke (msbethke@SF),
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3412484&group_id=191583

Note: this fix is (intentionally) different from the fix in the 2.3 branch
and includes a TODO note for some bigger changes that we should do.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1186 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 0fe45bca8a Merge admin_edit-admin.tpl and admin_create-admin.tpl
create-admin.php
- switch to edit-admin template
- rename a smarty variable
- add smarty mode = create variable

edit-admin.php:
- rename a smarty variable
- add smarty mode = edit variable

admin_edit-admin.tpl:
- merge with admin_create-admin.tpl
- add some {if $mode == '...'} switches 
- change <form> name to "admin"
- rename a smarty variable

admin_create-admin.tpl:
- deleted

*.lang:
- mark some $PALANG texts as obsolete:
  - $PALANG['pAdminCreate_admin_username']
  - $PALANG['pAdminCreate_admin_password'
  - $PALANG['pAdminCreate_admin_password2']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1151 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 310d22bb6e create-admin.php
- renamed $pAdminCreate_admin_username_text to $pAdminCreate_admin_username_text_error
- renamed $pAdminCreate_admin_password_text to $pAdminCreate_admin_password_text_error
- replaced $tMessage with $infoMessage (displayed via flash_info)
- additional change compared to Dale's patch: removed unused variable 
  $pAdminCreate_admin_username_text

variables.inc.php:
- removed now unused variables $pAdminCreate_admin_password_text and
  $pAdminCreate_admin_username_text

templates/admin_create-admin.tpl:
- added 4th column for error messages
- replaced <h3> with <th>
- marked labels with <label>
- align button with input fields
- remove tMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1099 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Sebastian 9ddf15439f - fix some display errors after rev. 788, found and patch supplied by Jan-Kruis, thx.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@791 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Sebastian b1287d97e2 - big merge of Postfixadmin smarty into trunk
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@757 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin 39953d029d rename templates to .php instead of .tpl
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@250 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 1132b958e5 Finally got rid of admin/ :-)
- moved admin-only scripts from admin/ to /
- removed all merged files ("require('../$file')") from admin/
- changed include paths - no more admin/superadmin switching needed
- admin_menu.tpl is also gone
- removed all menu.tpl / admin_menu.tpl switches - no more needed
- admin/index.php still exists and redirects to /



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@168 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago