Skip to content
Snippets Groups Projects
Commit a469efb1 authored by Robin Appelman's avatar Robin Appelman
Browse files

Add some safety checks

parent 9670d3e9
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
OCP\JSON::callCheck();
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('files_sharing');
$l = OC_L10N::get('files_sharing');
......
......@@ -6,9 +6,7 @@
* See the COPYING-README file.
*/
if (!\OC_App::isEnabled('files_sharing')) {
exit;
}
OCP\JSON::checkAppEnabled('files_sharing');
if (!isset($_GET['t'])) {
\OC_Response::setStatus(400); //400 Bad Request
......
......@@ -6,12 +6,16 @@
* See the COPYING-README file.
*/
OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$remote = $_GET['remote'];
if (file_get_contents('https://' . $remote . '/status.php')) {
echo 'https';
} elseif (file_get_contents('http://' . $remote . '/status.php')) {
echo 'http';
}else{
} else {
echo 'false';
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment