In upgrading from version 2.x to 3.1 I note a change in the way the secuirty plugin works. When using the function to change a password or check a password you must pass the plugin a userid. It works sometimes and not others.
I think the problem is that if you pass the userid as an integer it fails and if you pass the userid as text it works.
John McCann
Servoy 3.1
MS SQL Server 2000
Java 1.5
If you pass an integer, while the system requires text, the integer is translated to text. for example: integer 1 becomes text “1.0”
You should pass integereValue.toFixed(0)
Paul
Paul,
Try this.
var p = ‘the_password’
var x = 10
var z = ‘10’
var a = security.checkPassword(z, p)
var b = security.checkPassword(x, p)
a returns true and b returns false. I think it is a bug and wish Servoy would fix it. Sure I can write around it but to me it seems confusing and with no user benefit. Why change the behavior going from 2.x to 3.1?
John McCann
We changed the behavior to accommodate for external authentication (in Servoy 3) like LDAP, the user_id (int) is now user_uid (String) so your user_uid can now hold a LDAP id.
The only problem (which we already detected) is if you pass an old user_id number in JavaScript it is converter to a String 10 becomes ‘10.0’, Servoy 3.1.1 will detect the old numbers and format them again as ‘10’