Skip to content

Commit f4464c4

Browse files
melangerc00kiemon5ter
authored andcommitted
fix: correct user info loading in apple backend
incorrect function was used for parsing json (load is for files, loads for strings) and the error was masked because of too broad except clause
1 parent 48bd453 commit f4464c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/satosa/backends/apple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def response_endpoint(self, context, *args):
7676
# - https://developer.apple.com/documentation/sign_in_with_apple/namei
7777
try:
7878
userdata = context.request.get("user", "{}")
79-
userinfo = json.load(userdata)
80-
except Exception:
79+
userinfo = json.loads(userdata)
80+
except json.JSONDecodeError:
8181
userinfo = {}
8282

8383
authn_resp = self.client.parse_response(

0 commit comments

Comments
 (0)