I have a simple database with a user table, it has a simple administrator with
UserName = "Admin"
Password = "admins"
I am using NHibernate to query this table in the login form. Suppose that the login form is inserted with UserName="ADMIN" and password="ADMIN" as in uppercase.
The system should not allow login. However, when I use such a query,
using (var session = NhibernateHelper.OpenSession()) { return new List<User> (session.QueryOver<User>() .Where(u => u.UserName == userName) .And(u => u.Password == password) .Future()); }}
The system ignores case sensitivity and selects the user. So how can I make the request sensitive <? >
source share