https://bugzilla.wikimedia.org/show_bug.cgi?id=55190
Web browser: ---
Bug ID: 55190
Summary: *-login.data can have case discrepency on Linux host
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1475/
Reported by: jaclayiii
Created on: 2012-06-26 04:52:22
Subject: *-login.data can have case discrepency on Linux host
Original description:
Pywikipedia \[http\] trunk/pywikipedia \(r10401, 2012/06/21, 06:18:43\)
Python 2.7.2+ \(default, Oct 4 2011, 20:06:09\)
\[GCC 4.6.1\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok
Summary: the \*-login.data file maybe saved with an uppercase username but when
load cookies tries to find it on a Linux host, the case of the username maybe
lower. This has the unintended consequence of not allowing bots to login on
private wikis that have anonymous read api rights disabled.
If a user connects to a wiki that has LDAP or some other form of "add-on"
authentication, the user name returned may vary in case from what is in the
user-config.py file. The reason this matters is that the
<wikifamily>-<language>-<username>-login.data file may be
saved with an upper case letter in the username. Thus if the user-config.py
file contained:
users\["mywiki"\]\["en"\]="james"
but the LDAP authenticator returned back "James" as the username, then the
\*-login.data file would be mywiki-en-James-login.data, but when \_loadcookies
goes to look for such a file on line 5572:
if os.path.exists\(localPA\)
localPA is /~some/path/to/mywiki-en-james-login.data
Notice that the James is now lower case in the file above.
As Linux is case sensitive, it cannot find the login data and thus prevents
access to wikis the do not allow anonymous access to api's. A temporary work
around requires setting user name to the appropriate case \(even if the
username is case insensitive in the LDAP authentication scheme\), for example:
users\["mywiki"\]\["en"\]="James"
keywords: SSL, Login failure, https login failure, https linux login, https
pywikipedia, https pywikipedia linux
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l