mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-12 11:16:22 +00:00
extended subnet access control
This commit is contained in:
@@ -14,6 +14,10 @@ $controllers = loadAllContentControllers();
|
||||
if(!in_array('TextController',$controllers))
|
||||
exit(json_encode(array('status'=>'err','reason'=>'Text controller not enabled')));
|
||||
|
||||
// check if client has permission to upload
|
||||
if(defined('ALLOWED_SUBNET') && !isIPInRange( getUserIP(), ALLOWED_SUBNET ))
|
||||
exit(json_encode(array('status'=>'err','reason'=> 'Access denied')));
|
||||
|
||||
// check write permissions first
|
||||
if(!isFolderWritable(ROOT.DS.'data'))
|
||||
exit(json_encode(array('status'=>'err','reason'=>'Data directory not writable')));
|
||||
|
||||
Reference in New Issue
Block a user