Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code scanning alert no. 28: Information exposure through an exception #9

Draft
wants to merge 1 commit into
base: trusted-main
Choose a base branch
from

Conversation

msmannan00
Copy link
Owner

Fixes https://github.com/msmannan00/Orion-Search/security/code-scanning/28

To fix the problem, we should avoid exposing the exception details to the end user. Instead, we should log the detailed exception 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 exception and return a generic error message.

  • Modify the exception handling block in the __api_directory method to log the exception details and return a generic error message.
  • Ensure that the logging mechanism is in place to capture the detailed exception information for debugging purposes.

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

…tion

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant