security: fix CodeQL CWE-312 clear-text logging of sensitive information
Remove user_id (and Stripe-metadata-sourced plan_id/billing_cycle) from logger.info calls in billing.py (_on_checkout_completed, _on_subscription_updated) and onboarding.py (save_plan). Operations are still logged with non-identifying tier/billing-cycle details; user identity is no longer written to the log stream. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -185,7 +185,7 @@ def save_plan(request: Request, body: PlanBody, db: DbSession) -> dict[str, Any]
|
||||
db.rollback()
|
||||
raise
|
||||
|
||||
logger.info("Onboarding: saved plan %s/%s for user %s", body.subscription_tier, body.billing_cycle, user_id)
|
||||
logger.info("Onboarding: saved plan %s/%s", body.subscription_tier, body.billing_cycle)
|
||||
return _profile_to_dict(profile)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user