Uh oh!
There was an error while loading. Please reload this page.
Remove the need for CSRF check on ocs::getCurrentUser - #7798
Conversation
Fixes#5694 I tested on my server, and worked like a charm :) I think in term of security it is fine to open this route. What do you think?
rullzer
commented
Jan 11, 2018
Well yes this fixes it but it removes the CSRF protection... also it is not a generic approach we basically need to fix the middleware to not check for CSRF if the bearer auth is set much like the OCS-APIREQUEST header |
MorrisJobke
commented
Jan 16, 2018
The proper fix seems to be #7873 - @pierreozoux could you check if this works for you? |
rullzer
commented
Jan 24, 2018
Yes lets do it in #7873 |
|
rullzer
commented
Jan 27, 2018
@Dagefoerde well yes. However I'm not a fan of multiple hacks to fix the same issue ;) Also since it is not enough for #5694 fixing it properly and making sure if you chose to extend NC support in moodle with other endpoints this just works makes more sense imo :). Looking forward to your review of #7873, THNX :) |
Dagefoerde
commented
Jan 29, 2018
Regardless, for my (and Moodle's) needs the fix of #7873 is exactly the way to go, so thanks (again) for that, @rullzer. In the present PR the real issue is that the |
rullzer
commented
Jan 29, 2018
The CSRF protection is on by default. You have to add the annotation to disable it ;). So there is no @CSRFrequired annotation. |
Dagefoerde
commented
Jan 29, 2018
A right, it was the other way round. Sorry for that. So I have to revise: You could consider adding the |
Fixes#5694
I tested on my server, and worked like a charm :)
I think in term of security it is fine to open this route. What do you think?