Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mclmax committed Oct 8, 2024
1 parent 6bd6af2 commit a509309
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions canarytokens/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,12 @@ def _parse_credit_card_v2_trigger(
request: Request,
) -> CreditCardV2TokenHit:
data = {k.decode(): [o.decode() for o in v][0] for k, v in request.args.items()}

if "merchant" in data:
data["merchant"] = json.loads(data["merchant"])
if "risk_details" in data:
data["risk_details"] = json.loads(data["risk_details"])

trigger_data = CreditCardTrigger(**data)

hit_time = datetime.utcnow().strftime("%s.%f")
Expand Down

0 comments on commit a509309

Please sign in to comment.