[En-Nut-Discussion] NutRegisterAuth Problems

Damian Slee damian at commtech.com.au
Tue Jan 13 09:53:21 CET 2004


I believe the correct change for dencode.c was changing ints to char.  This works for me with any length password.



char *NutDecodeBase64(u_char * str)
{
    /* bug fix from Damian Slee. */
    char code;
    char *sp;
    char *tp;
    char last = -1;
    char step = 0;

    for (tp = sp = str; *sp; ++sp) {
    	if (*sp < 0)
    	    continue;
        if ((code = PRG_RDB(&base64dtab[(int) *sp])) == -1)
            continue;
        switch (step++) {
        case 1:
            *tp++ = ((last << 2) | ((code & 0x30) >> 4));
            break;
        case 2:
            *tp++ = (((last & 0xf) << 4) | ((code & 0x3c) >> 2));
            break;
        case 3:
            *tp++ = (((last & 0x03) << 6) | code);
            step = 0;
            break;
        }
        last = code;
    }
    *tp = 0;
    return str;
}

-----Original Message-----
From: Simon Biniek [mailto:lightfreakde at yahoo.com]
Sent: Tuesday, 13 January 2004 4:40 PM
To: en-nut-discussion at egnite.de
Subject: [En-Nut-Discussion] NutRegisterAuth Problems


Hi,

i'm still having Problems with NutRegisterAuth.
My Nut/OS Version is 3.3.2. I've tried the Fix in
Dencode.c
if ((code = PRG_RDB(&base64dtab[(int) *sp])) == 255)
but the User:Pass length must be a multiple of 3
otherwise the authorization fails.
Has anyone a fix?

Simon

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion



More information about the En-Nut-Discussion mailing list