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

           Summary: Successful Edit Call to wrong page
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


I am making a successful edit call to the api page, however the page
'Wiki/api.php' is createdand/or modified upon calls to the api via a post
request


some code:

def updatePage():
    now = datetime.datetime.now()

    data = [
        ('action','edit'),
        ('title','User:Gcallaghan'),
        #('pageid','97859'),
        ('section','new'),
        ('summary','test'),
        ('text',now),
        ('token',EDIT_TOKEN),
        ('format','xml'),
    ]

    query = '&'.join(map(lambda x: '%s=%s'% x,data))
    #print "EDIT_TOKEN: %s" % EDIT_TOKEN
    #print WIKI_API
    url = urllib.urlencode(data)
    print url
    req = urllib2.Request('%s?%s'%(WIKI_API,url))
    response = urllib2.urlopen(req, urllib.urlencode(data))
    print response.geturl()
    return response




getting the edit token ...
{'lastrevid': '897567', 'pageid': '97859', 'title': 'User:Gcallaghan',
'counter': '14', 'edittoken': '+\\', 'length': '13', 'touched':
'2009-07-14T18:28:06Z', 'new': '', 'ns': '2'}

constructed url arguments ...
https://wiki.eng.<private
domain>/wiki/api.php?action=edit&title=User%3AGcallaghan&section=new&summary=test&text=2009-07-16+12%3A53%3A26.737674&token=%2B%5C&format=xml

and the response ...
<?xml version="1.0" encoding="utf-8"?><api><edit result="Success"
pageid="98255" title="Wiki/api.php" oldrevid="903116" newrevid="903118"
/></api>


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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

Reply via email to