since the snap module runs without permissions controls, verify the logged in channel matches the requested cloud path
This commit is contained in:
parent
8eac8132e3
commit
af13e5fa4a
@ -58,6 +58,15 @@ class Snap extends \Zotlabs\Web\Controller {
|
|||||||
else
|
else
|
||||||
killme();
|
killme();
|
||||||
|
|
||||||
|
if($_SERVER['PHP_AUTH_USER'] && $_SERVER['PHP_AUTH_USER'] !== $which)
|
||||||
|
killme();
|
||||||
|
|
||||||
|
if(local_channel()) {
|
||||||
|
$c = \App::get_channel();
|
||||||
|
if($c && $c['channel_address'] !== $which)
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
if(! in_array(strtolower($_SERVER['REQUEST_METHOD']),['propfind','get','head']))
|
if(! in_array(strtolower($_SERVER['REQUEST_METHOD']),['propfind','get','head']))
|
||||||
killme();
|
killme();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user