-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: MediaWiki API integration #7
Comments
Hi @davidhedlund, I'm afraid I can provide only limited help since I am not currently developing in MediaWiki and have stopped maintaining this project. I haven't used pywikibot before, but with MediaWiki 1.27.1 I was able to interact with the MediaWiki API using a bot from a Bash command line script. As of 1.27, logins can be facilitated using the If it's possible to configure pywikibot to use I can provide this excerpt from my Bash script in case that's helpful. Note that the original script has only been tested on MediaWiki 1.27.1, and this short excerpt hasn't been tested at all. Good luck to you! EDIT: If I recall correctly, my bot account was created while I had temporarily disabled CASAuth, so the password salting performed by CASAuth wasn't an issue for me.
|
Yes, that was exactly the issue. For a normal user there is no way of knowing the hashed salted 'string' MediaWiki recognizes as the account's main password. Wondering if it is possible that CASAuth integrates with CAS so that 'somehow' the passwords that gets sent to MediaWiki API is verified against CAS, instead of the salted hash. |
I want to confirm that your script works (even if this cannot be used to solve our problem): With my user account created while CASAuth enabled:
With my user account created with CASAuth temporarily disabled:
|
Cannot login to wiki via MediaWiki API; as a result automated API-based libraries like pywikibot cannot login.
It's theoretically possible to login via API using the hash, but since the MD5 hash is salted the end user has no way of obtaining their own password.
The CASAuth extension is installed in Free Software Directory (aka the Directory). The Free Software Foundation needs pywikibot to occasionally batch upload tens of thousands files to the Directory to sync the wiki with the data provided by the Debian package repository.
The text was updated successfully, but these errors were encountered: