Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF check failed when trying to access '/facerecognition/persons' API #433

Closed
nikhilsjohn opened this issue Feb 27, 2021 · 2 comments
Closed

Comments

@nikhilsjohn
Copy link

Hi,

I am new to using nextcloud and the face recognition app. In my instance, the face detection works as expected and is detecting faces correctly. This data is displayed when I go to user > setting > Face Recognition. This part is all good.

However when I try to access the REST API via curl to obtain the result as a json, it is showing me the following error : "message : CSRF check failed"

My Curl command: curl --silent -u username:password -X GET 'http://192.168.1.44/index.php/apps/facerecognition/persons'

I use Nextcloud version 20.0.7 via docker on my PC.

Is there a configuration or header that I missed? Thank you very much for your time.

Expected behaviour

A json responds as described here: https://github.com/matiasdelellis/facerecognition/wiki/RESTful---Endpoint---API

Actual behaviour

"message : CSRF check failed"

Server configuration

  • Operating system: Official Nextcloud image + Added Pdlib, Dlib

  • Pdlib version:

  • How is DLib installed: Make sure it is working correctly with this tool
    Compiled

  • How is PDlib installed: Make sure it is working correctly with this tool
    Compiled

  • PHP version:

  • Web server: Apache

  • Database: mariadb (also via docker)

  • Nextcloud version: 20.0.7

Client configuration

  • Browser: Terminal

  • Operating system: Ubuntu 18

@matiasdelellis
Copy link
Owner

Hi @nikhilsjohn
This documentation is out of date. Change completely, and security was improved by preventing its use with CURL..

Now we have to make an official API out of the application endpoints. 😞

@nikhilsjohn
Copy link
Author

Hi @matiasdelellis

Thank you for the reply. If needed, I will be able to help you with it when I get some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants