-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnfo.php
More file actions
30 lines (23 loc) · 740 Bytes
/
nfo.php
File metadata and controls
30 lines (23 loc) · 740 Bytes
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
<?php
$dataReader = new SettingDataReader('users');
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="Secure Area');
header('HTTP/1.0 401 Unauthorized');
echo 'Zugriff nur mit Passwort';
exit;
} else {
if (!$dataReader->getVal('users',$_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="Secure Area"');
header('HTTP/1.0 401 Unauthorized');
echo 'Zugriff nur mit Passwort';
exit;
}
if ( $dataReader->getVal('users',$_SERVER['PHP_AUTH_USER']) !== sha1($_SERVER['PHP_AUTH_PW']) ){
header('WWW-Authenticate: Basic realm="Secure Area"');
header('HTTP/1.0 401 Unauthorized');
echo 'Zugriff nur mit Passwort';
exit;
}
}
echo __FILE__;
phpinfo();