Details
-
Bug
-
Status: Done
-
Must
-
Resolution: Done
-
2.1.0
-
None
Description
Description
When the Data Filter module is deployed alongside the OAuth 2 Login module(it could be any other module/api), some SQL queries may end up malformed triggering a chain of exceptions that brings down OpenMRS. This is because the placeholders are filled only when the sessions users is authenticated.
The OAuth 2 Login module attempts to create users and associates them to provider accounts before an authenticated session has opened. For this reason, some logic in the Data Filter module shared in solution below fails when there is no authenticated user on that session.
Solution
To resolve this, placeholders filled only after authentication has happened should be filled with arbitrary placeholder strings like it is already done here in ImplDataFilterListener.