]> andersk Git - sql-web.git/blame - setup.php
Fix CSRF vulnerabilities
[sql-web.git] / setup.php
CommitLineData
9840d102 1<?php
79ffa771
JP
2/*
3 (c) 2005 Joe Presbrey
4*/
9840d102
JP
5
6require_once('mitsql.cfg.php');
7require_once('mitsql.lib.php');
8
9if (!isLoggedIn()) redirect('index');
10
11$User = new User($Login->getUserID());
12
13if (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
28include 'tpl/setup.php';
29
30?>
This page took 0.073728 seconds and 5 git commands to generate.