se2024-jpg / WolfTrack6.0

A personal job-tracker application
MIT License
0 stars 1 forks source link

Fix code scanning alert no. 10: Information exposure through an exception #23

Closed joeljogy closed 3 weeks ago

joeljogy commented 3 weeks ago

Fixes https://github.com/se2024-jpg/WolfTrack6.0/security/code-scanning/10

To fix the problem, we need to ensure that detailed error messages are not exposed to the end user. Instead, we should log the detailed error message on the server and return a generic error message to the user. This can be achieved by modifying the exception handling code to log the error and return a generic message.

Specifically, we will:

  1. Import the logging module to enable logging of error messages.
  2. Replace the detailed error messages returned to the user with a generic message.
  3. Log the detailed error message on the server.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

girish1430 commented 3 weeks ago

Please resolve merge conflicts :)

girish1430 commented 3 weeks ago

Looks like there's still conflict