Projects STRLCPY GraphSpy Commits 8433c28b
🤬
  • Fixed small oversight in 1.0.2 to take scenarios into consideration where the idtyp claim is not present in the access token.

  • Loading...
  • RedByte1337 committed 2 months ago
    8433c28b
    1 parent ed72e119
  • ■ ■ ■ ■ ■ ■
    GraphSpy/GraphSpy.py
    skipped 91 lines
    92 92   user = "unknown"
    93 93   # If the idtype is user, use the unique_name or upn
    94 94   # If the idtype is app, use the app_displayname or appid
     95 + # Otherwise, use whatever we can get
    95 96   if "idtyp" in decoded_accesstoken and decoded_accesstoken["idtyp"] == "user":
    96 97   user = decoded_accesstoken["unique_name"] if "unique_name" in decoded_accesstoken else decoded_accesstoken["upn"] if "upn" in decoded_accesstoken else "unknown"
    97 98   elif "idtyp" in decoded_accesstoken and decoded_accesstoken["idtyp"] == "app":
    98 99   user = decoded_accesstoken["app_displayname"] if "app_displayname" in decoded_accesstoken else decoded_accesstoken["appid"] if "appid" in decoded_accesstoken else "unknown"
     100 + else:
     101 + user = decoded_accesstoken["unique_name"] if "unique_name" in decoded_accesstoken \
     102 + else decoded_accesstoken["upn"] if "upn" in decoded_accesstoken \
     103 + else decoded_accesstoken["app_displayname"] if "app_displayname" in decoded_accesstoken \
     104 + else decoded_accesstoken["oid"] if "oid" in decoded_accesstoken \
     105 + else "unknown"
    99 106  
    100 107   execute_db("INSERT INTO accesstokens (stored_at, issued_at, expires_at, description, user, resource, accesstoken) VALUES (?,?,?,?,?,?,?)",(
    101 108   f"{datetime.now()}".split(".")[0],
    skipped 528 lines
  • ■ ■ ■ ■
    GraphSpy/version.txt
    1  -1.0.2
     1 +1.0.3
Please wait...
Page is in error, reload to recover