lieutar / mechanize-userscripts.org

userscripts.org のスクリプトをCLIで更新するためのもの
2 stars 1 forks source link

Login validation #10

Closed alexandre-mbm closed 10 years ago

alexandre-mbm commented 10 years ago

The script is not complaining authentication failures and this can confuse very much the user.

POST http://userscripts.org/login
  authenticity_token={CRYPT_KEY_1} (hidden readonly)
  login=                         (text)
  password=                      (password)
  redirect=                      (hidden readonly)
  remember_me=1                  (checkbox) [<UNDEF>/off|*1/Remember me on this computer]
  commit=Login                   (submit)

In case of the authentication is unsuccessful, the robot continues to receive form for authentication, as shown in the issue #9. But what the is correct is stop the flow and notify to user.

This will be added by the pull request #11. I'm doing it. Done!

alexandre-mbm commented 10 years ago

Test:

alexandre$ ./post-userscripts-org.pl
Invalid login or password, try again please.

image-mec