Skip to content

Commit

Permalink
fix connections to paranoid PRONOTE servers
Browse files Browse the repository at this point in the history
Servers can turn on encryption using the "http" attribute in the body
element.
  • Loading branch information
bain3 committed Nov 18, 2023
1 parent c60b9a9 commit 675b954
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pronotepy/pronoteAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def initialise(self) -> Tuple[Any, Any]:
)

uuid = base64.b64encode(
self.encryption.aes_iv_temp
if self.root_site.startswith("https")
else self.encryption.rsa_encrypt(self.encryption.aes_iv_temp)
self.encryption.rsa_encrypt(self.encryption.aes_iv_temp)
if self.attributes.get("http", False)
else self.encryption.aes_iv_temp
).decode()
# post
json_post = {"Uuid": uuid, "identifiantNav": None}
Expand Down

0 comments on commit 675b954

Please sign in to comment.