https://bugzilla.wikimedia.org/show_bug.cgi?id=58980

       Web browser: ---
            Bug ID: 58980
           Summary: Write Python script to create new wiki user(s)
           Product: Wikimedia
           Version: wmf-deployment
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Quality Assurance
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: jh...@wikimedia.org
                CC: cmcma...@wikimedia.org, zfili...@wikimedia.org
    Classification: Unclassified
   Mobile Platform: ---

The Mediawiki API provides the ability to create new user accounts[1]

For example, the following two Curl commands issued in sequence will create a
new user at a Mediawiki instance running on "localhost":


curl -c cookies.txt -X POST
"http://localhost/mediawiki/api.php?action=createaccount&name=Tester&password=test1234&language=en&format=json&token=";


curl -b cookies.txt -X POST
"http://localhost/mediawiki/api.php?action=createaccount&name=Tester&password=test1234&language=en&format=json&token=<token
provided in response to previous request>"


As a proof-of-concept, create a Python script that will do the same thing, with
two special functions:

1) The URL of the Mediawiki instance should be created from the value of an
environment variable called "API_URL" (for example, using Python's "os.getenv"
method).

2) The account name and password should be randomly generated alphanumeric
strings, each with a length of 8 characters.



[1] http://www.mediawiki.org/wiki/API:Account_creation

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to