[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-28 Thread MarcoAurelio
MarcoAurelio added a comment. In T328814#8649703 , @Xqt wrote: > It is difficult to fix this issue without having a private wiki for tests. The patch above is more or less a guess using your api response. Are you able to test it?

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-27 Thread Xqt
Xqt added a comment. It is difficult to fix this issue without having a private wiki for tests. The patch above is more or less a guess using your api response. Are you able to test it? TASK DETAIL https://phabricator.wikimedia.org/T328814 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-27 Thread gerritbot
gerritbot added a comment. Change 892495 had a related patch set uploaded (by Xqt; author: Xqt): [pywikibot/core@master] [bugfix] Get a token for private wiki https://gerrit.wikimedia.org/r/892495 TASK DETAIL https://phabricator.wikimedia.org/T328814 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-26 Thread MarcoAurelio
MarcoAurelio added a comment. In T328814#8647066 , @Xqt wrote: > Hi you both, > > can somone test login without the login script as follows > > import pywikibot > from pywikibot import config > config.debug_log =

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-26 Thread MarcoAurelio
MarcoAurelio added a comment. Hello @Xqt: In my case, it's a WMF private wiki which may make things easier. Right now it's using `MediaWiki 1.40.0-wmf.24`. PWB version data: $ python pwb.py version -v Pywikibot: [https] r-pywikibot-core.git (d703ece, g17791, 2023/02/23,

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-26 Thread Xqt
Xqt added a comment. Hi you both, can somone test login without the login script as follows import pywikibot from pywikibot import config config.debug_log = [''] site = pywikibot.Site() site.login() # or site.login(user=) TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-26 Thread Xqt
Xqt added a comment. @chiefgeek157: What is your Pywikibot version? Can you please run `pwb version`. TASK DETAIL https://phabricator.wikimedia.org/T328814 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: MarcoAurelio, Xqt, Aklapper,

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-25 Thread MarcoAurelio
MarcoAurelio added a comment. In T328814#8589920 , @chiefgeek157 wrote: > What this seems to say is that SiteInfo attempts to go get tokens, but the API request includes requests for info that are behind the login wall for the API.

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-10 Thread MarcoAurelio
MarcoAurelio added a comment. I can reproduce for a WMF private wiki I have access to. Moreover if you delete the `.lwp` file hosting the cookie data, `login.py` seems unable to log the bot back in, repeatedly reporting a 'readapidenied' error. TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-06 Thread chiefgeek157
chiefgeek157 added a comment. More info. Lines marked >>>RJC>>> are my debug prints. % pwb login >>>RJC>>> APISite.version() >>>RJC>>> SiteInfo._get_general(key=generator, expiry=1 day, 0:00:00 >>>RJC>>> general not in self._cache >>>RJC>>> forcing >>>RJC>>> props:

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-06 Thread chiefgeek157
chiefgeek157 added a comment. Here is a hand-built "log" based on print statements I previously inserted in a local copy. at line 406, here is the data: self.action = 'login' login_result = { 'warnings': { 'main': { '*':

[Pywikipedia-bugs] [Maniphest] [Commented On] T328814: Login retrieves token from incorrect location

2023-02-04 Thread Xqt
Xqt added a comment. > should be changed to: > > login_request[ > self. Keyword('token')] = response['token'] this proposal does not work because no token is given with the response: {'code': 'badtoken', 'info': 'Invalid CSRF token.', 'other': {'help': 'See