Skip to content

Commit

Permalink
Updating user_get_websudo to set the not_json_response as true
Browse files Browse the repository at this point in the history
  • Loading branch information
amad1101 committed Nov 4, 2023
1 parent 364b16f commit aaf5c5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -1966,11 +1966,12 @@ def user_get_websudo(self):
"webSudoPassword": self.password,
"webSudoIsPost": "false",
}
answer = self.get("secure/admin/WebSudoAuthenticate.jspa", self.form_token_headers)
answer = self.get("secure/admin/WebSudoAuthenticate.jspa", self.form_token_headers, not_json_response=True)
decoded_answer = answer.decode()
atl_token = None
if answer:
if decoded_answer:
atl_token = (
answer.split('<meta id="atlassian-token" name="atlassian-token" content="')[1]
decoded_answer.split('<meta id="atlassian-token" name="atlassian-token" content="')[1]
.split("\n")[0]
.split('"')[0]
)
Expand Down

0 comments on commit aaf5c5f

Please sign in to comment.