Forums

Sublime Text and PythonAnywhereEditor

Hey everyone, habits are hard to break and this is what I've been using for a long while so I thought I'd ask here because it does look like something broke in it! https://github.com/kutu/PythonAnywhereEditor

Before I start messing things up in the plugin itself like I did when the CSRF token was added I'd like to ask if there were any changes in the way Pythonanywhere handles their login.

I did read the blog and it didn't really point me in any specific direction so if there could be any help in merit that'd be great. As far as the specifics of the plugin go, what it does to login is simply send a POST request to the /login/ page with csrftoken/username/password and the referer using urrlib2, but looks like that's not enough anymore, rather, some fix is needed in the request as a "HTTP Error 400: Bad Request" is returned.

Any help is greatly appreciated, thank you.

Hi there,

Do you know approximately what time it broke? (or when it was last successful? eg: a week ago? a day ago? a month ago?) we did change the login page a little bit for two factor auth awhile ago.

I'm thinking most likely you'd need to post the request with csrf token, auth-username, auth-password, login_view-current_step (== auth) as the post parameters (we might have changed the param names?)

Conrad

I can almost assuredly say that the plugin and the request itself in the code was working at the end of August. Unfortunately I would not be able to pinpoint a more specific timeframe.

I'm going to double check the POST parameters' names and see if I can manage to understand where to grab login_view-current_step. Thanks a lot for the reply for the time being.

Any update on this? I've been looking into using SSH on Sublime, but this looks easier, assuming I can get it to work.