Fix auth
This commit is contained in:
parent
4e1c3432a4
commit
0125c31f7f
@ -1,5 +1,5 @@
|
||||
%interface% {
|
||||
basicauth {
|
||||
basicauth / {
|
||||
%userpw% }
|
||||
log {
|
||||
output file /var/www/upload.log
|
||||
|
||||
@ -17,7 +17,7 @@ $headers=getallheaders();
|
||||
$authuser=$headers['X-User'];
|
||||
if($authuser!==''){
|
||||
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 class="left">User:</td>
|
||||
@ -26,7 +26,7 @@ if($authuser!==''){
|
||||
</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>
|
||||
<td>Target:</td>
|
||||
<td>
|
||||
|
||||
@ -8,7 +8,7 @@ if($_SERVER['REQUEST_METHOD']!=='POST'){
|
||||
|
||||
function Back($msg){
|
||||
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">
|
||||
</form></div>');
|
||||
exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user