Skip to content

Conversation

@xDido
Copy link
Collaborator

@xDido xDido commented Jun 1, 2025

Potential fix for https://github.com/advanced-computer-lab-2023/CodeMedics-Clinic/security/code-scanning/1

To fix the SSRF vulnerability, we need to validate and sanitize the user-controlled inputs (patientUsername, appointmentId, and packageName) before using them in the URL. Specifically:

  1. Use an allow-list to restrict valid values for patientUsername, appointmentId, and packageName.
  2. Ensure that the constructed route does not allow path traversal or other malicious manipulations.
  3. Refactor the code to use server-controlled values instead of directly incorporating user input into the URL.

The changes will be made in Frontend/el7a2ny-frontend/src/components/CheckoutForm.js to validate the inputs before constructing the URL.


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

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.

2 participants