Fix auth
This commit is contained in:
parent
4e1c3432a4
commit
0125c31f7f
@ -1,5 +1,5 @@
|
|||||||
%interface% {
|
%interface% {
|
||||||
basicauth {
|
basicauth / {
|
||||||
%userpw% }
|
%userpw% }
|
||||||
log {
|
log {
|
||||||
output file /var/www/upload.log
|
output file /var/www/upload.log
|
||||||
|
|||||||
@ -17,7 +17,7 @@ $headers=getallheaders();
|
|||||||
$authuser=$headers['X-User'];
|
$authuser=$headers['X-User'];
|
||||||
if($authuser!==''){
|
if($authuser!==''){
|
||||||
print('
|
print('
|
||||||
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://nouser@'.$_SERVER['HTTP_HOST'].'" method="post">
|
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://nouser:wrongpw@'.$_SERVER['HTTP_HOST'].'" method="post">
|
||||||
<tr><td></td><td align="center"><h1>Stream Upload</h1></td></tr>
|
<tr><td></td><td align="center"><h1>Stream Upload</h1></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="left">User:</td>
|
<td class="left">User:</td>
|
||||||
@ -26,7 +26,7 @@ if($authuser!==''){
|
|||||||
</form>');
|
</form>');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form action="upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">
|
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Target:</td>
|
<td>Target:</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if($_SERVER['REQUEST_METHOD']!=='POST'){
|
|||||||
|
|
||||||
function Back($msg){
|
function Back($msg){
|
||||||
print('<p>'.$msg.'</p>
|
print('<p>'.$msg.'</p>
|
||||||
<form action="/" method="post">
|
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].'" method="post">
|
||||||
<input type="submit" value="Upload another file" name="submit">
|
<input type="submit" value="Upload another file" name="submit">
|
||||||
</form></div>');
|
</form></div>');
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user