-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
fix(route/twitter): Prevent storing empty cookie if obtaining such from auth_token
failed.
#17232
Conversation
…om `auth_token` failed.
Successfully generated as following: http://localhost:1200/twitter/user/DIYgod - Failed ❌
|
8ef9ae7
to
d224d67
Compare
This commit broke the Twitter routes on RSSHub instances that authenticate using I suspect the issue might be here:
|
@AiraNadih It works on my side. What error messages are given? |
|
I don't think the token method is stable, even before this pr. Please try a few times more. |
But after I rolled back to commit 682c943, it was normal. I'm currently using this commit node's Docker image. |
I just tested it again. The first request after initial deployment is normal, but subsequent requests will result in errors. Rolling back to the previous commit works correctly. |
One strange quirk I've noticed about the auth_token cookie is that quoting the variable sometimes fixes it. It'll randomly fail on my deployment, but if I change it from TWITTER_AUTH_TOKEN=token_name to TWITTER_AUTH_TOKEN='token_name', or vice-versa, it'll return to a usable state. EDIT: It could just be the fact that I'm modifying the variable and giving it time to restart that's helping the instance re-stabilize. Point is, this behavior has been ongoing since RSSHub switched to using the TWITTER_AUTH_TOKEN config, before and after this pull request was merged, at least on my deployment. |
Seeing the latest merged PR #17429, I finally understand where the problem lies. |
…om `auth_token` failed. (DIYgod#17232)
Involved Issue / 该 PR 相关 Issue
Close #
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
Puppeteer
Note / 说明