Roan Kattouw a écrit :
Nicolas Vervelle schreef:
  
Hi,

The message given when providing an incorrect login is not correct : on 
the example below, wait is 15, but the text is 5.
Also, I am not sure that the throttle is really 5 seconds for the first 
incorrect login.

<?xml version="1.0" encoding="UTF-8"?>
<api>
  <login result="WrongPass" wait="15" details="Please wait 5 seconds 
before next log-in attempt" />
</api>

  
    
Good catch, this was fixed in r33280 [1]. Note that throttling only 
works when memcached is enabled, which is why it may not work for you on 
your test install. It should definitely work on WMF wikis, though.

Roan Kattouw (Catrope)
  
Thanks for the fix.

My remark about throttling was that on WMF wikis, the first throttling seems to be a lot longer than 5 seconds.

For example, I tried login first with an incorrect password :
1208281294329: http://fr.wikipedia.org/w/api.php?lgpassword=XXXXX&action=login&lgname=WikiCleanerBot&format=xml
********** START OF DOCUMENT **********
<?xml version="1.0" encoding="UTF-8"?>
<api>
  <login result="WrongPass" wait="5" details="Please wait 5 seconds before next log-in attempt" />
</api>

**********  END OF DOCUMENT  **********

and then with a correct password about 30 seconds later (the first value is the current time in milliseconds) :
1208281326188: http://fr.wikipedia.org/w/api.php?lgpassword=XXXXX&action=login&lgname=WikiCleanerBot&format=xml
********** START OF DOCUMENT **********
<?xml version="1.0" encoding="UTF-8"?>
<api>
  <login result="WrongPass" wait="15" details="Please wait 15 seconds before next log-in attempt" />
</api>

**********  END OF DOCUMENT  **********

The second attempt was rejected also.

and a third time a few minutes later was succesful :
1208281604094: http://fr.wikipedia.org/w/api.php?lgpassword=XXXXX&action=login&lgname=WikiCleanerBot&format=xml
********** START OF DOCUMENT **********
<?xml version="1.0" encoding="UTF-8"?>
<api>
  <login result="Success" lguserid="351003" lgusername="WikiCleanerBot" lgtoken="a1ee70e4974e08a25608384a8f8e6ebd" cookieprefix="frwiki" sessionid="dcea7e2720824df4470f4855a6777892" />
</api>

**********  END OF DOCUMENT  **********

Nico