jiveshkalra / SecureHack-Quest-TechBuzz

1 stars 16 forks source link

[Vulnerability] Redundant Parsing of JSON Response #204

Open Sahilkumarvhandu opened 1 month ago

Sahilkumarvhandu commented 1 month ago

Description of the Vulnerability

Parsing the response multiple times is inefficient, and in some scenarios, it is problematic. Ideally, response should be parsed only once, and further actions should be executed accordingly.

Screen Shot of the Vulnerable Code

image

Impact of the vulnerability

4/5[ The JSON response is being parsed twice in case of an error. This is an unnecessary operation and may lead to unpredictable behavior.]

Recommended Steps to resolve it?

Continue directly after parsing the JSON response and perform response processing and error handling in a cohesive manner.

School Name

G.D Goenka Sector 10A