Fix hardcoded spooldir in upload.php
This commit is contained in:
parent
d3816cc0bc
commit
fd8e56db5a
|
@ -47,7 +47,7 @@ if(isset($_FILES)) {
|
||||||
// Check auth here
|
// Check auth here
|
||||||
if(isset($_POST['key']) && password_verify($CONFIG['thissitekey'].$_POST['username'], $_POST['key'])) {
|
if(isset($_POST['key']) && password_verify($CONFIG['thissitekey'].$_POST['username'], $_POST['key'])) {
|
||||||
if(check_bbs_auth($_POST['username'], $_POST['password'])) {
|
if(check_bbs_auth($_POST['username'], $_POST['password'])) {
|
||||||
$userdir = '/var/spool/rslight/upload/'.strtolower($_POST[username]);
|
$userdir = $spooldir.'/upload/'.strtolower($_POST[username]);
|
||||||
$upload_to = $userdir.'/'.$_FILES[photo][name];
|
$upload_to = $userdir.'/'.$_FILES[photo][name];
|
||||||
if(is_file($upload_to)) {
|
if(is_file($upload_to)) {
|
||||||
echo $_FILES[photo][name].' already exists in your folder';
|
echo $_FILES[photo][name].' already exists in your folder';
|
||||||
|
|
Loading…
Reference in New Issue