Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Commit

Permalink
Move CSRF check
Browse files Browse the repository at this point in the history
jPlayer doesn't send our CSRF request token.
  • Loading branch information
LukasReschke committed Mar 14, 2013
1 parent 73bda2a commit 64ce426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion media/ajax/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

\OCP\JSON::checkAppEnabled('media');
\OCP\JSON::checkLoggedIn();
\OCP\JSON::callCheck();

error_reporting(E_ALL); //no script error reporting because of getID3

Expand Down Expand Up @@ -43,6 +42,7 @@
if ($arguments['action']) {
switch ($arguments['action']) {
case 'delete':
\OCP\JSON::callCheck();
$path = $arguments['path'];
$collection->deleteSongByPath($path);
$paths = explode(PATH_SEPARATOR, \OCP\Config::getUserValue(\OCP\USER::getUser(), 'media', 'paths', ''));
Expand Down

6 comments on commit 64ce426

@zeugmatis
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed my broken mediaplayer too after upgrading yesterday - hopefully this gets into mainline soon.
(still not indexing my music anymore though but that is a separate bug)

@mr00t
Copy link

@mr00t mr00t commented on 64ce426 Mar 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not work for me in 5.0.
I use the player from 4.5.7 with the #rightcontent -part from the 5.0 music.css now >:-D

@greg0r
Copy link

@greg0r greg0r commented on 64ce426 Mar 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix worked for me as well.
OC 5.0.0
ubuntu 12.04
php 5.3.10

Thanks

@dukejohn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it for me as well, thanks
OC 5.0.0
Ubuntu 12.10

@HLFH
Copy link

@HLFH HLFH commented on 64ce426 Mar 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukasReschke
Doesn't work on Safari, works on Firefox & Chrome !
Server : HackBerry A 10
Debian Wheezy Headless ARM
Owncloud 5
PHP 5.4.14
Nginx

Browser client : Safari 6.0.3
OS client : OS X 10.8.3

@patschi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me perfectly on:
Google Chrome
Debian Squeeze 6.0.7
OwnCloud 5
PHP 5.4.13
nginx

Please sign in to comment.