mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-02-20 17:54:25 +01:00
Added CSRF checks
This commit is contained in:
parent
150943aa00
commit
e504d6bfc4
@ -29,6 +29,7 @@ $RUNTIME_NOSETUPFS=true;
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
require_once(OC::$APPSROOT . '/apps/bookmarks/bookmarksHelper.php');
|
||||
$id = addBookmark($_POST['url'], $_POST['title'], $_POST['tags']);
|
||||
|
@ -29,6 +29,7 @@ $RUNTIME_NOSETUPFS=true;
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$id = $_POST['id'];
|
||||
if (!OC_Bookmarks_Bookmarks::deleteUrl($id)){
|
||||
|
@ -29,6 +29,7 @@ $RUNTIME_NOSETUPFS=true;
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
|
||||
|
Loading…
x
Reference in New Issue
Block a user