Fix #3224: 403 Forbidden when logging in to DeviantArt.
Login fails if the User-Agent isn't set while POST'ing the login credentials.
This commit is contained in:
@@ -142,6 +142,8 @@ module Sources
|
||||
|
||||
def session_cookies(mech)
|
||||
Cache.get(DEVIANTART_SESSION_CACHE_KEY, 2.hours) do
|
||||
mech.request_headers = Danbooru.config.http_headers
|
||||
|
||||
page = mech.get("https://www.deviantart.com/users/login")
|
||||
validate_key = page.search('input[name="validate_key"]').attribute("value").value
|
||||
validate_token = page.search('input[name="validate_token"]').attribute("value").value
|
||||
|
||||
Reference in New Issue
Block a user