Apply xpath encoding where needed #263

Open
opened 2019-07-09 11:38:02 +00:00 by matthijskooijman · 0 comments
matthijskooijman commented 2019-07-09 11:38:02 +00:00 (Migrated from github.com)

We occasionally use xpath queries in the code, inserting arbitrary (or even user-controlled) strings into the queries. To prevent issues with special characters (quotes in particular) and security problems, these strings should be encoded before inserting into xpath.

There is an encoding function available in this PR, but we should probably go over the code at some point to doublecheck every xpath query uses it when needed.

We occasionally use xpath queries in the code, inserting arbitrary (or even user-controlled) strings into the queries. To prevent issues with special characters (quotes in particular) and security problems, these strings should be encoded before inserting into xpath. There is an encoding function available [in this PR](https://github.com/PlanBCode/hypha/pull/229/commits/12973e426c8cbd88d2c3d6c3540be6be0413f28e), but we should probably go over the code at some point to doublecheck every xpath query uses it when needed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha#263
No description provided.