password - case sensitive - Forum

Forum Navigation
You need to log in to create posts and topics.

password - case sensitive

hello

I use Database Pro to store users' passwords. How is the password entered case sensitive?

@s7shanbe

I use Database Pro to store users' passwords. How is the password entered case sensitive?

I am not sure I fully understand your question ... but you can use a TextEntry object with Style >>> Validation set to Password.

I did a quick test and then displayed the Variable (to store TextEntry contents) in an AlertBox ... case sensitivity was preserved.

This value should be stored (unchanged) in a String field within your Table.

luishp and Vadim have reacted to this post.
luishpVadim

@gaev

My opinion of sensitive
Sensitivity to uppercase and lowercase letters.

@s7shanbe

My opinion of sensitive
Sensitivity to uppercase and lowercase letters.

I understood that case referred to upper vs. lower cased letters  i.e. A vs. a

What I did not understand was what the issue was vis-a-vis the Database ... did my earlier response answer your enquiry ? ... if not, please elaborate.

@geav

For example, to enter your username in the password field, uppercase and lowercase letters must be different. Is it possible that "A" is not the same as "a"?

For example, when the password is "A" and you enter the password "a", it is not correct.

@s7shanbe

You can compare strings by first converting them to ASCII characters with the zmFunctions (Peter Pavlov) plugin.

In this case you will be able to compare not only "A" and "a", but also "A\a" of different languages.

Take a look at the sample in the attachment.

Uploaded files:
  • You need to login to have access to uploads.
s7shanbe has reacted to this post.
s7shanbe

@vadim

tank you.

 

 

@s7shanbe

Here is this plugin in English:

s7shanbe has reacted to this post.
s7shanbe

@s7shanbe

After looking at the postd response by @vadim, I realized that the problem you were encountering was not to do with the TextEntry (Password) object's data entry functionality, but a previously reported problem with the If command, which does NOT support case-sensitive string/text comparisons.

The Javascript method (localeCompare) IS case sensitive ... description from w3schools ...

The localeCompare method returns a number indicating whether str1 comes before, after or is the same as str2 in sort order.

Returns -1 if str1 is sorted before str2
Returns 0 if the two strings are equal
Returns 1 if str1 is sorted after str2

... I tried these tests ...

var str1 = "ab";
var str2 = "ab";
//var str2 = "Ab";
var n = str1.localeCompare(str2);

... and it returned 0 only when the two strings were equal casewise.

 

So, it is possible to create a VisualNEOWin Javascript Function that can be Call'ed in place of the If command.

 

If there is sufficient interest, I can develop such a Function for the community.

 

Vadim has reacted to this post.
Vadim

@gaev

I think such a feature would be useful. The regular IF and IFEx commands are really not case-sensitive.

@s7shanbe

Although for the task of checking the password for validity it is better to write (store) and then compare its hash. This is safer and more correct in this sense.

 

@vadim

I think such a feature would be useful. The regular IF and IFEx commands are really not case-sensitive.

I will develop a Call'able Function using Javascript ... and post it here within the week ... look something like ...

Call "CaseSensitiveIf" "[stringAVariable]" "[StringBVariable]" "[resultVariable]"

... and [resultVariable] will contain one of text values isGreater, isEqual, isLess ... so the developer can then do a regular If on this [resultVariable] to determine next action.

Although for the task of checking the password for validity it is better to write (store) and then compare its hash. This is safer and more correct in this sense.

Although I know the concept of hashes (used them as index values on flat files, before databases were invented) ... and I did a quick Google search to find Javascript code ... I think such functionality may take me a bit longer to develop (first, I need to learn the 'mechanics of hashing' as well as some advanced Javascript features like 'prototyping').

@gaev

There are enough functions to create hashes. I wrote this for the author of the topic. In case he wants to reconsider the way of working with passwords.

Now you can create different hashes with ajgMD5 1.0 (Francisco Aaryn), zmFunctions 1.0b (Peter Pavlov), NeoDouble 1.0.6 (David Esperalta), NeoCipher 1.0b (David Esperalta) and Dembel function library.

 

Hello

Thank you @vadim
and @gaev

ZmFunctions plugin
Which Vadim introduced
My problem was solved.