Last modified: 2014-09-18 08:20:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56541, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54541 - When loging in to a site, try the site-configured username if any
When loging in to a site, try the site-configured username if any
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 22:20 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-18 08:20 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Copy of attachment from http://sourceforge.net/p/pywikipediabot/patches/621/attachment/login-site-username.diff (1.59 KB, text/plain)
2013-09-24 22:20 UTC, Kunal Mehta (Legoktm)
Details

Description Kunal Mehta (Legoktm) 2013-09-24 22:20:35 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/patches/621/
Reported by: gallaecio
Created on: 2013-08-03 20:30:54.056000
Subject: When loging in to a site, try the site-configured username if any
Original description:
Comment 1 Kunal Mehta (Legoktm) 2013-09-24 22:20:40 UTC
Created attachment 13369 [details]
Copy of attachment from http://sourceforge.net/p/pywikipediabot/patches/621/attachment/login-site-username.diff
Comment 2 Andre Klapper 2013-12-02 00:55:17 UTC
[No attachment in Gerrit, hence resetting status and adding keyword. See https://bugzilla.wikimedia.org/describekeywords.cgi and https://www.mediawiki.org/wiki/Bug_management/Bug_report_life_cycle for more information.]
Comment 3 Ricordisamoa 2014-07-23 11:31:48 UTC
The patch does not appear to solve anything: site.userinfo holds information about the currently logged-in user.
Comment 4 John Mark Vandenberg 2014-09-18 08:17:52 UTC
The is an interesting approach which I am guessing solves part of the 'SUL' problem.

Instead of having to add usernames['wikipedia']['*'] = '..'; usernames['wikisource']['*'] = '..'; to user-config.py etc etc for every family in the matrix of the global account.

If a account is logged into it.wp using an entry in user-config.py, and the bot visits en.wikipedia, the bot *is* logged in, as they have a unified account, and the cookie logs them in, and api.py automatically populates userinfo with the username.

That works wonderfully, and doesnt need this patch.

I am guessing this patch is about when there is a 'problem' with the existing login, which might be because of site.py tripping over itself (the login code is a mess), or maybe the server asking the account to login again.

If the password_file contains simple two-part matching entry for the username in siteinfo, the re-login will be automatic.  i.e. (bot_username, bot_password) ; not (family, username, password) or other options.

I would like to hear more about how this patch helps, but it does appear useful in limited but crucial circumstances.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links