At 12:00am -0800 00-03-14, Palm Developer Forum digest wrote:
>Subject: Bug
>From: [EMAIL PROTECTED]
>Date: Tue, 14 Mar 2000 11:52:15 +0530
>X-Message-Number: 110
>
>Hello All,
>               I have encountered the following problem and it seem to me
>that it is a bug.
>
>Steps to reproduce it:
>
>Step 1:
>Set "test" as password using security application.
>
>Step 2:
>Now write a program with the following code.
>
>static char    Test[6]        =    "TESTB";
>Boolean        Result
>PwdSet ("test", Test);
>Result         =    PwdVerify(Test);
>
>On running the program the Result shows that the operation is successful
>but now if you go to the
>security application then on trying to manually change the password you
>will find that the
>password(TESTB) is wrong. Strangely the problem seems to exist for values
>of Test which have
>capital alphabets only.
>I may be wrong, if so please tell me what is the mistake.

Versions of Palm OS prior to 3.5 relied on the caller of PwdSet to 
lower-case the password before calling the routine. Thus the Security 
application did this both before setting a new password, and when 
validating an old password.

So the problem with your code is that you're not calling StrToLower 
on the TEST[6] string.

With Palm OS 3.5 and later, the lower-casing is handled by PwdSet and 
PwdVerify, so you don't need to do it yourself...and in fact you 
shouldn't. The reason is that saved passwords shouldn't depend on the 
implementation of StrToLower, which (for example) did indeed change 
between 3.3 and 3.5 (older versions only lower-cased 'A'...'Z', and 
ignored case conversion for high-ASCII characters).

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to