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

RA-1772: Fix stored xss in appointment scheduling #32

Merged
merged 1 commit into from Jun 9, 2020

Conversation

isears
Copy link
Member

@isears isears commented May 29, 2020

Why?
Appointment scheduling is vulnerable to stored XSS as described here: https://talk.openmrs.org/t/responsible-vulnerability-disclosure/27899

What Changed?
Updated the service type validator so that it doesn't accept service names with HTML characters.

Decisions Made
It looks like we're using bind-html-unsafe angular directive in a few places in this module so that <strong></strong> tags can be dynamically injected. As such, I opted to sanitize inputs rather than outputs because sanitizing the outputs would likely break the dynamic HTML injection functionality.

@isears isears requested a review from mogoodrich May 29, 2020 22:15
pom.xml Outdated
@@ -133,6 +133,12 @@
<version>2.2</version>
</dependency>

<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is! I just updated to use the version from WebUtils in core.

@isears isears requested a review from dkayiwa May 31, 2020 21:05
@isears isears changed the title RA-1772: Fix stored xss is appointment scheduling RA-1772: Fix stored xss in appointment scheduling May 31, 2020
Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mogoodrich
Copy link
Member

Thanks, finally getting to this @isears , looks good to me I think we are fine to merge!

@dkayiwa dkayiwa merged commit 34213c3 into openmrs:master Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants