Although filters are optional in XPath expressions, for performance and security reasons, a at least one filter should always be specified to prevent reading the whole table.


== Noncompliant Code Example

----
/Employees/Employee/UserID |
/Employees/Employee/FirstName |
/Employees/Employee/LastName |
/Employees/Employee/SSN |
/Employees/Employee/Salary
----


== Compliant Solution

----
/Employees/Employee[Managers/Manager/text() = Joe]/UserID | 
/Employees/Employee[Managers/Manager/text() = Joe]/FirstName | 
/Employees/Employee[Managers/Manager/text() = Joe]/LastName | 
/Employees/Employee[Managers/Manager/text() = Joe]/SSN | 
/Employees/Employee[Managers/Manager/text() = Joe]/Salary 
----


== See

* https://www.owasp.org/index.php/Top_10-2017_A3-Sensitive_Data_Exposure[OWASP Top 10 2017 Category A3] - Sensitive Data Exposure


