Phantom42 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/330144 )
Change subject: Fix broken LDAP based login ...................................................................... Fix broken LDAP based login Fixed that LDAP based login failed, if wiki used two or more domains. Bug: T90149 Change-Id: I819137c4592cf43608904a4d30a981d965dee1c3 --- M pywikibot/data/api.py 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/44/330144/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 3b2ae9d..cf635b0 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -3028,11 +3028,14 @@ time.sleep(diff.seconds) # base login request - login_request = self.site._request( - use_get=False, - parameters=dict(action='login', - lgname=self.login_name, - lgpassword=self.password)) + predata = dict(action='login', + lgname=self.login_name, + lgpassword=self.password) + + if self.site.family.ldapDomain: + predata['lgdomain'] = self.site.family.ldapDomain + + login_request = self.site._request(use_get=False, parameters=predata) # get token using meta=tokens if supported if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.27'): -- To view, visit https://gerrit.wikimedia.org/r/330144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I819137c4592cf43608904a4d30a981d965dee1c3 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Phantom42 <nikita...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits