-
Notifications
You must be signed in to change notification settings - Fork 72
Conversation
@plredmond Dang that's very kind of you! I unfortunately finished the app using my fork and moved on without any chance to go back and clean it up. Your help is much appreciated, even though it does lack a key feature. But at least it's getting closer. |
@3noch No problem! I needed this functionality for something I'm working on. Sorry for cutting out the |
@plredmond thanks for doing this, I'm going down the same path today wishing for CSRF to be optional. I have one nitpicky comment - given that this library started with I'll test these changes today and report back. |
This was my change originally. The library used both CSRF and XSRF in random places so I picked what seemed to be the dominant one and normalized. I think using both is the most confusing of the options. |
I didn't see that in the diff - I do agree consistency is important so nevermind my comment. |
I've tested with |
@plredmond could you rebase please? |
Sure
|
@plredmond could you also add a test case for |
Yep. I'll do that Sunday or Monday.
|
@plredmond thanks - I think once it's proven that logic in |
…t cookies are present and removed (and also that they provide authentication)
@domenkozar However, Additionally 5f78fc4 changes all server-spec tests not to rely on the default name for the session cookie. Let me know if you want this reverted. |
Ok.. it looks like I can't use a few pieces of |
Hey, I think this is ready for review again. I didn't mention it, but the
build for all versions is working now.
…On Tue, Apr 24, 2018 at 10:23 AM, Domen Kožar ***@***.***> wrote:
@plredmond <https://github.com/plredmond> thanks - I think once it's
proven that logic in clearSession works, we can merge this :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#92 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABB19FLUXFHSE5FacOSEgrPfv-8dH2QRks5trzV1gaJpZM4TVqbW>
.
|
@plredmond do you think it would be better to delete the cookie instead of setting value to "value"? For example one might check for existence of the cookie if someone is signed in (not in a secure way). |
I think you're right that deleting the cookie would be semantically
cleaner. I don't know why the original author set the cookie to "value"
instead of deleting the cookie. One possible explanation is that cookie
deletion was flakey on older browsers. IE. A browser willing to set & read
cookies is likely willing to set a cookie to a dummy value (where deletion
might not work).
…On Mon, Jun 4, 2018 at 1:15 PM, Domen Kožar ***@***.***> wrote:
@plredmond <https://github.com/plredmond> do you think it would be better
to delete the cookie instead of setting value to "value"? For example one
might check for existence of the cookie if someone is signed in (not in a
secure way).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#92 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABB19NnKbbFUb7A4qaW4c4FnVCXcobuNks5t5WtAgaJpZM4TVqbW>
.
|
The |
This changeset resolves @jkarni's request for @3noch to fix the tests in #54 which resulted in that PR being reverted just after it was merged.
It also resolves the 4th todo-item from #64, Add option without cookies.
However, this changeset undoes part of #54, namely its name, Add check-origin method for CSRF. The addition of the versatile hook for rejecting requests seemed like a bigger fish than making XSRF optional, and so #53 remains unfixed.