[sr-dev] Bug in www_authorize/challenge functions

Alex Balashov abalashov at evaristesys.com
Thu Oct 7 10:34:43 CEST 2010


On 10/07/2010 04:28 AM, Andrei Pelinescu-Onciul wrote:
> On Oct 07, 2010 at 04:04, Alex Balashov<abalashov at evaristesys.com>  wrote:
>> On 10/07/2010 04:01 AM, Alex Balashov wrote:
>>
> [...]
>>
>> However, www_authorize() still returns -1 (invalid user).  The
>> problem is not entirely solved.  :/
>
>
> That's a documentation problem. The return codes have changes
> (auth_db returns directly the error code of auth).
>
> -1 = authentication error (could be bad credentials, internal error
>       , credentials not found for the givel realm a.s.o)
> -2 = password
> -3 = user unknown
>
> It could also be fixed by adding return code translation to the expected
> values for k, to modules_k/auth_*

Brilliant; when I updated my code to look for these return codes 
instead, now the behaviour is much more sensible.  :-)  Thank you, Andrei!

I suggest just keeping the return codes like this and updating the docs.

-- 
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the sr-dev mailing list