Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.144.97.170
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : bug8735.phpt
--TEST--
Regression test for bug #8735
--FILE--
<?php
set_include_path(dirname(dirname(__FILE__)) . ':' . get_include_path());
$datasrc = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bug8735.passwd';

require_once 'PEAR.php';
require_once 'Auth.php';

$a = new Auth('File', 
		array('file' => $datasrc, 
			'type' => 'AuthBasic'),
		'displayLogin');
if (PEAR::isError($a)) {
	print $a->getMessage();
	exit;
}

$error = $a->removeUser('username');
if (PEAR::isError($error)) {
	print $error->getMessage();
	exit;
}

readfile($datasrc);
print "-- cut --\n";

$error = $a->addUser('username', 'password');
if (PEAR::isError($error) || $error === false) {
	print "Error happened when adding.\n";
	print $error->getMessage();
	exit;
}

readfile($datasrc);

$a->removeUser('username');
?>
--EXPECT--
test:fcfKBtvEwG4g.
-- cut --
test:fcfKBtvEwG4g.
username:{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=
© 2025 GrazzMean