[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 9981 – Bot keeps losing session cookie

Last modified: 2009-12-09 15:04:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9981 - Bot keeps losing session cookie
Bot keeps losing session cookie
Status: RESOLVED INVALID
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-20 17:08 UTC by Sebastian Moleski
Modified: 2009-12-09 15:04 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sebastian Moleski 2007-05-20 17:08:15 UTC
For about a week now my bots keep losing session information. Until now, the bot would open special:userlogin at the start of a run, keep the cookie it gets and send it with each edit. For some reason, this doesn't seem to always work anymore. A good example of what happens can be shown here:
1.) logged on: http://de.wikipedia.org/w/index.php?title=Spezial:Beitr%C3%A4ge&dir=prev&offset=20070520165517&limit=6&contribs=user&target=Sebbot
2.) suddenly logged off: 
http://de.wikipedia.org/w/index.php?title=Spezial:Beitr%C3%A4ge&dir=prev&offset=20070520164842&limit=10&target=85.178.200.216

There are no IP changes and a delay of no more than 20 seconds between the edit with and without login information. Is there something I should do differently so this doesn't happen anymore?
Comment 1 Marco 2007-06-15 19:37:22 UTC
You have to request Spezial:Anmelden twice.

1) a normal HTTP request to http://de.wikipedia.org/wiki/Spezial:Anmelden *without* sending any form of cookies, POST or GET data
2) you get a session cookie. formed like this:
 Set-Cookie: dewiki_session=blablablablubblub; path=/
3) Take the cookie and remember it.
4) Send a HTTP POST request to  http://de.wikipedia.org/w/index.php?title=Spezial:Anmelden&action=submitlogin&type=login with following details
- Take care of the action=submitlogin&type=login in the URI
- Send the dewiki_session cookie you just got
- The POST data: wpRemember=1&wpName=USER&wpPassword=PASSWORD&wpLoginattempt=Anmelden
- Of course replace the placeholders; do not forget to urlencode() them.
5) You get three additional cookies back with the success message:
Set-Cookie: dewikiUserID=blub; expires=Sun, 15-Jul-2007 19:15:55 GMT; path=/
Set-Cookie: dewikiUserName=blub; expires=Sun, 15-Jul-2007 19:15:55 GMT; path=/
Set-Cookie: dewikiToken=blubblubblabla; expires=Sun, 15-Jul-2007 19:15:55 GMT; path=/
6) Include these cookies AND the dewiki_session cookie you got in 2) at *EVERY* request you do, regardless if you read only or submit a edit. Note you *must not* take care of the EXPIRES attribute!

Marco
Comment 2 Chad H. 2009-12-09 15:04:47 UTC
Marking INVALID because A) partly seems like user error, B) WFM, C) because you should be using the API for bots by now and D) bugs in the API would go elsewhere.

Note You need to log in before you can comment on or make changes to this bug.


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011