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

Update Wikimate::token() to remember CSRF token (fixes #115) #122

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

Xymph
Copy link
Collaborator

@Xymph Xymph commented Aug 24, 2021

See issue #115. Storing and re-using the token reduces the number of API calls when invoking multiple edit/delete/etc actions in a session, as is typical bot behavior.

The error value of token() is also changed to null (false should only be used by boolean methods). Since token() is an internal method, I don't consider this an API-breaking change.

@Xymph Xymph requested a review from waldyrious August 24, 2021 11:49
Copy link
Collaborator

@waldyrious waldyrious left a comment

Choose a reason for hiding this comment

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

LGTM, but not merging immediately in case you want to address the nitpick comment I left inline.

@Xymph
Copy link
Collaborator Author

Xymph commented Aug 24, 2021

Not really, but I think I'll need to rebase/push for the merge conflict first, right?

Edit: Done, conflict resolved, ready for merge.

@Xymph Xymph force-pushed the 122-store-csrf-token branch from 7ba2a86 to 2a8a803 Compare August 25, 2021 09:24
@waldyrious
Copy link
Collaborator

I think it's nice to rebase even when there aren't conflicts, to avoid crossing branches and provide a semi-linear git graph. :)

@waldyrious waldyrious merged commit 4b8652b into hamstar:master Aug 25, 2021
@Xymph Xymph deleted the 122-store-csrf-token branch August 25, 2021 12:33
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

Successfully merging this pull request may close these issues.

2 participants