Click here to Skip to main content
15,895,656 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I have ldap injection issue in below code. I need to perform whitelist based validation for all the inputs to resolve this issue.

can any one help me, how to validate this four parameters.

inputs are string and string[].




DirectoryEntry entry = server.GetSearchRoot(uri.DistinguishedName);


using (DirectorySearcher searcher = new DirectorySearcher(entry, uri.Filter, uri.AttributeNames, uri.Scope))
{
return server.ExecuteBestEffortSearch(searcher);
Posted
Comments
Mehdi Gholam 26-Nov-15 3:22am    
Validate your inputs.
Sinisa Hajnal 26-Nov-15 3:53am    
So, perform whitelist based validation...if you know what you need to do, why the question? If you need help with the implementation, post your code and explain what you need. Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900