-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gz, now your app is vulernable to CSRF ;)
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BernhardPosselt Why?
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because CORS annotations explicitely disallow session authentication which is the root issue of CSRF (without csrf token). There's a ticket in core which I can't work on anymore due to working a full time job which would introduce a new external API interface which does this out of the box. The hotfix for now was to disallow session auth when using @cors (since its an API annotation). I don't know why it's not yet in the docs, but here's the code https://github.com/owncloud/core/blob/master/lib/private/appframework/middleware/security/corsmiddleware.php#L85
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I'm not sure what to change here. I feel like every new OC release I've had to change something with the API, which is really frustrating since I'm in the same boat as you with a full time role.
Is it possible to include CORS in ownNote with this outstanding in core?
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, just revert the commit and add back the annotations.
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then this happens in OC 9: #286
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 8.2.3, same issue for news app. Could also be an android lib issue that tries to use cookies no matter what
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also does not happen for everyone
b0254fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce it btw