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 for Implementing URL Redirect Validation and Warning Feature #7376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sravyakaranam
Copy link

@sravyakaranam sravyakaranam commented Apr 19, 2024

This pull request enhances the OpenEMR application to strengthen security measures related to URL redirects and forwards. The changes address the vulnerability identified in ASVS V5.1.5 regarding input validation and potential untrusted content.

Fix for: #7377
Description of what this pull request does:
This pull request improves the security of the OpenEMR application by adding a feature that checks if links users click on lead to trusted websites. If a link goes to an unknown or potentially risky site, users will see a warning message before being redirected. This helps prevent users from accidentally visiting harmful websites, making the application safer to use.

Changes Proposed in this Pull Request:

  • Implementation of URL Redirect Validation:
    Added JavaScript code to validate redirect URLs against a whitelist of known and trusted domains.
    Prevents redirects to URLs not present in the whitelist.
    Displays a warning message to the user if attempting to redirect to an unknown domain, allowing them to make an informed decision.
  • Enhanced User Input Sanitization:
    Ensured proper sanitization and validation of user input used to construct redirect URLs.
    Mitigates the risk of injection attacks and manipulation of redirect behavior by malicious users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants