/usr/share/php/test/Auth_HTTP/tests/test_digest_get.php is in php-auth-http 2.1.6-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <?php
require_once "Auth/HTTP.php";
define('DSN','sqlite://dummy:@localhost//tmp/user.db?mode=0644');
$options = array('dsn'=>DSN, 'authType'=>'digest');
$auth = new Auth_HTTP("DB", $options);
$auth->setRealm('dummy', 'sample');
$auth->start();
?>
<html>
<head><title>HTTP digest authentication for GET method</title></head>
<body>
<?php
print "auth: ".$auth->authMethod."<br />";
print "username: ".$auth->username."<br />";
print "password: ".$auth->password."<br />";
print "auth: ".print_r($auth->auth)."<br />";
if($auth->getAuth()) {
print <<<EOS
<form action="{$_SERVER['PHP_SELF']}" method="get">
<input type="text" name="title" value="php5" />
<input type="submit" />
</form>
EOS;
}
if (!empty($_POST['title'])) {echo 'Title: '.$_POST['title'];}
?>
</body></html>
|