I've created custom authentication method which basically takes two inputs from user, check if there is a record in database for such a combination and if so then user is authenticated correctly. It is simple and works fine the only problem is if my password is "hash1" then "HASH1", "haSH1 "hAsh1 " etc. are also valid.
My system just ignores trailing spaces and it is not case sensitive. I don't change password string by myself but when I add it as a query parameter
command.Parameters.Add("@pass", SqlDbType.VarChar, -1).Value = password;
the debuuger shows me there are some default options which probably cause this behavior.
Is there a way how to turn off or change these options for specific parameter?
//Possible duplicate is only a part of the solution. I would like to know how to change those CompareOptions.