login question

Questions, tips and tricks and techniques for scripting in Servoy

login question

Postby Detox » Sat May 21, 2011 9:53 pm

Hello All!

when I use the smart client. i type in my username (BOB123) and password
If I type Bob123 I can still log in

How can I deny access if I use the wrong (upper/lower)case letter?
I would like to require an exact match in order to successfully log in.
I assume this would require some sort of check for exact username in db, but how can I do that?


Thanks for any help
Detox
 
Posts: 73
Joined: Wed Dec 13, 2006 11:02 pm

Re: login question

Postby Harjo » Sat May 21, 2011 10:04 pm

What database are you using? Sybase, is by default case insensitive
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: login question

Postby Detox » Sat May 21, 2011 10:11 pm

sorry for not specifying sybase
Detox
 
Posts: 73
Joined: Wed Dec 13, 2006 11:02 pm

Re: login question

Postby Detox » Sun May 22, 2011 5:47 am

This is what I want to modify:

security.getUserName( [userUID])

Can I specifiy some parameter with this to have exact match? BOB123 vs Bob123?
Detox
 
Posts: 73
Joined: Wed Dec 13, 2006 11:02 pm

Re: login question

Postby jcompagner » Mon May 23, 2011 11:18 am

if you use the default servoy authenticator (so you didn't specify your own authenticator solution for this) then servoy just does:

"select user_uid from servoy_users where user_name=? and user_password=?"

and yes as Harjo said, if the database is case insensitive then it will return the uuid and the user is logged in.

You could make your database case sensitive or i guess have your own authenticator that checks this for you somehow if you have your own user management
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Methods

Who is online

Users browsing this forum: No registered users and 11 guests