Streamline CSRF and login check

Let's make this consistent with other pieces of the code to make it easier to auditable.
This commit is contained in:
Lukas Reschke 2015-01-20 12:24:13 +01:00
parent 2ac015256f
commit e25a0303f4
1 changed files with 3 additions and 6 deletions

View File

@ -3,9 +3,8 @@
// Init owncloud
global $eventSource;
if(!OC_User::isLoggedIn()) {
exit;
}
\OCP\JSON::checkLoggedIn();
\OCP\JSON::callCheck();
\OC::$server->getSession()->close();
@ -17,8 +16,6 @@ $source = isset( $_REQUEST['source'] ) ? trim($_REQUEST['source'], '/\\') : '';
if($source) {
$eventSource = \OC::$server->createEventSource();
} else {
OC_JSON::callCheck();
}
function progress($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) {