since the snap module runs without permissions controls, verify the logged in channel matches the requested cloud path

This commit is contained in:
zotlabs 2016-10-09 21:36:55 -07:00
parent 8eac8132e3
commit af13e5fa4a

View File

@ -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();