The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
A PHP based password store
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
723 B

<?php
require 'config.php';
include 'sanitychecks.php';
include 'session.php';
include 'check_user.php';
include 'smarty_init.php';
include 'class.db.php';
$error = 0;
if (array_key_exists('oldpw', $_POST) && array_key_exists('newpw1', $_POST) && array_key_exists('newpw2', $_POST))
{
$error = '';
try {
pwsdbh($dbDSN)->changePassword($_SESSION['loginuser'], $_POST['oldpw'], $_POST['newpw1'], $_POST['newpw2']);
$error = 0;
}
catch (PDOException $e)
{
$error = 255;
}
catch (PWSdbhException $e)
{
$error = $e->getCode();
}
catch (Exception $e)
{
$error = 254;
}
}
$tpl->assign('errno', $error);
$tpl->assign('isadmin', pwsdbh($dbDSN)->isAdmin($_SESSION['loginuser']));
$tpl->display('cpw.tpl');