Fix Gitlab/JsonSafeParse: lib/gitlab/import/user_from_mention.rb
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Fix Gitlab/JsonSafeParse violations in this file by replacing Gitlab::Json.parse with Gitlab::Json.safe_parse.
Related MR: !215073 (merged)
Implementation Plan
A contributor needs to:
-
Replace
Gitlab::Json.parsewithGitlab::Json.safe_parsein this file. -
Verify with the MR reviewer that the new size and depth limits imposed by
safe_parsedo not break any existing functionalities. Thesafe_parsemethod includes built-in protections against:- Excessively large JSON payloads
- Deeply nested JSON structures
Ensure that legitimate use cases in this file are not affected by these limits.
Edited by 🤖 GitLab Bot 🤖