LDAP based login is broken in Pywikibot because lgdomain is not set

Couldn't figure out why core didn't work on my wiki with LDAP login. After some debugging I found out that lgdomain doesn't seem to be set anywhere at all. See|query+info

If I just hardcode login_request["lgdomain"] = "mydomain" in, it magically works. The login logic should look in the family file if self.ldapDomain is set and if that's the case include it in the request.

Pywikibot is a Python-based framework to write bots for MediaWiki. See for more information, and for a short online interactive tutorial. Patches can be submitted via Gerrit (you need a account). More documentation on Gerrit can be found at After you have successfully claimed this task on this site please do use the task in Phabricator for communication instead of this site. This allows more PWB developers to be reached! General development questions can be asked on the Pywikibot mailing list at and the #pywikibot IRC channel (see

Task tags

  • python
  • login
  • pywikibot
  • ldap

Students who completed this task


Task type

  • code Code