]> andersk Git - sql-web.git/blob - setup.php
Fix CSRF vulnerabilities
[sql-web.git] / setup.php
1 <?php
2 /*
3         (c) 2005 Joe Presbrey
4 */
5
6 require_once('mitsql.cfg.php');
7 require_once('mitsql.lib.php');
8
9 if (!isLoggedIn()) redirect('index');
10
11 $User = new User($Login->getUserID());
12
13 if (isPost()) {
14         if (isset($i_chgpw)) {
15                 $p1 = (isset($i_p[1])?$i_p[1]:'');
16                 $p2 = (isset($i_p[2])?$i_p[2]:'');
17                 if (empty($p1)) {
18                         $err[] = 'You may not have a blank password.';
19                 } elseif ($p1 != $p2) {
20                         $err[] = 'Your confirmation password does not match.';
21                 } else {
22                         $User->setPassword($p1);
23                         $msg[] = 'Your password was changed.';
24                 }
25         }
26 }
27
28 include 'tpl/setup.php';
29
30 ?>
This page took 0.289886 seconds and 5 git commands to generate.