passwords

Richard Kreiss rkreiss at verizon.net
Thu Feb 10 16:23:22 PST 2011


Over the past few years I have added passwords to access some functions in a
file or allowing access to or changing specific fields in a record.

Either inputpw or inputpw popup was used with the dummy field pw(15,*).

I never really considered whether filePro was taking into account the
capital letters used in a password.  The answer to this is of course not.  

Consider pw="password"  and  pv-"Password" 

If: pw = pv
Then: msgbox "these are the same"

If: pw ne pv
Then: errorbox "these are different"

As far as filePro is concerned, they are the same.

I ran into this the other day when testing a new routine and forgot to
capitalize the first and 8th letter of the password.

I finally wrote a routine which will test for capitals  

Letters F and B  FooBar

If:
Then: f=mid(pw,"1","1");m-mid(pw,"4","1")
If: acs(f) ne 70"
Then:ct=ct+"1";GOTO get_pw
If: asc(m) ne "66"
Then:ct=ct+"1";GOTO get_pw

I am now testing for the capital letters before the whole password is
checked.

I could probably do

If: pw="FooBar" and asc(f)="70" and asc(m) ="66"
Then: GOTO doit
If:
Then: end

Any of you have a routine for checking for capital letters?

Richard






More information about the Filepro-list mailing list