-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Properly pass loginCookie in all requests #2053
base: main
Are you sure you want to change the base?
Conversation
@malik1004x Thank you for your fix which at a first look is OK to me. We will do a proper review. Does that mean that you use MWoffliner to scrape a wiki which needs to be logged in to have the article content visible? I ask because we have another ticket I'm not able to assess at #2006 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2053 +/- ##
==========================================
- Coverage 74.45% 71.98% -2.48%
==========================================
Files 41 41
Lines 3144 3148 +4
Branches 688 691 +3
==========================================
- Hits 2341 2266 -75
- Misses 683 748 +65
- Partials 120 134 +14 ☔ View full report in Codecov by Sentry. |
Unfortunately not as of this commit – there is another almost-working branch in my repo. I'll PR when I have a moment. |
After looking at #2006 it appears to be the exact issue I was facing on my private wiki – I have managed to create a backup after some further bugfixes (the API check also needs the loginCookie passed in, while the current official version uses a blank login cookie). There's a separate branch with the fix on my repo, I'll re-check it and PR. |
@malik1004x All great, please just update this PR with the rest of the code |
I've merged the branch with the fix into main – PR should contain the full fix now. Account-only wikis should be scrapeable (mine is). Tests go through on my local (Debian 12). |
@malik1004x Thank you very much. @audiodude is the code reviewer, but to me we should not pass all these login info all over the function, they should just be used at a low level if specified. |
It's not my preferred solution either, but there's not much we can do if the API check doesn't use the Downloader class, instead making requests "on its own". |
Upon receiving the login cookie it is not updated in the jsonRequestOptions field and therefore not sent in subsequent requests. This causes permission issues on private wikis.
Fixed #2006