Skip to content

Commit

Permalink
Update mediawiki.py
Browse files Browse the repository at this point in the history
+AuthException at access_token
  • Loading branch information
albertoleoncio authored Apr 4, 2024
1 parent 61d58d6 commit edb16ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions social_core/backends/mediawiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def access_token(self, token):
params={"title": "Special:Oauth/token"},
auth=auth_token,
)
if response.content.decode().startswith("Error"):
raise AuthException(self, response.content.decode())

Check warning on line 95 in social_core/backends/mediawiki.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/mediawiki.py#L95

Added line #L95 was not covered by tests
credentials = parse_qs(response.content)
oauth_token_key = credentials.get(b"oauth_token")[0]
oauth_token_secret = credentials.get(b"oauth_token_secret")[0]
Expand Down

0 comments on commit edb16ef

Please sign in to comment.