mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-16 13:08:01 +00:00
added client subnet filter
This commit is contained in:
@@ -21,6 +21,10 @@ if(!isFolderWritable(ROOT.DS.'data'))
|
||||
else if(!isFolderWritable(ROOT.DS.'tmp'))
|
||||
exit(json_encode(array('status'=>'err','reason'=>'Temp directory not writable')));
|
||||
|
||||
// check if client has permission to upload
|
||||
if(defined('ALLOWED_SUBNET') && !isIPInRange( getUserIP(), ALLOWED_SUBNET ))
|
||||
exit(json_encode(array('status'=>'err','reason'=> 'Access denied')));
|
||||
|
||||
$hash = sanatizeString(trim($_REQUEST['hash']))?sanatizeString(trim($_REQUEST['hash'])):false;
|
||||
|
||||
// check for POST upload
|
||||
|
||||
Reference in New Issue
Block a user