Case-insensitive tokens

Julien ÉLIE julien at trigofacile.com
Sat Aug 20 20:13:41 UTC 2011


Hi Russ,

>> I suggest the following patch:
>
>>   * checking that the last argument to "ctlinnd addhist"
>>     is either '' or a valid token;
>
>>   * using @000000000000000000000000000000000000@ when the token
>>     is empty ('') for "ctlinnd addhist" or badly formatted for
>>     any other function calling TextToToken();
>
>>   * fixing the result of the hexadecimal conversion when a lowercase
>>     character is used.  Transform it to an uppercase character.
>
> Those all look like a good idea to me.

OK.  Changes committed for INN 2.5.3.
I also added another check in IsToken() so as not to allow '@' inside a 
token (besides the first and the last character).

@0000000000000000000000000 at 0000000000@ (with 3 '@') is now rejected,
as well as @0000000000000000000000000@&"çz000000@ (no check was done 
after the first '@' seen).



>> As it is not the same value ('a' != 'A'), it gives different results in
>> our conversion routines.  That's why maybe it would be wiser to reject
>> lowercase tokens.
>
> I can't imagine anyone typing these in by hand rather than cutting and
> pasting them, and they're intended to be opaque identifiers.  It might be
> simpler to just reject lowercase.

Adopted, thanks.

-- 
Julien ÉLIE

« – Hou hou !
   – Ouille, ouille !
   – Ouf !
   – Où ouf ? » (Astérix)



More information about the inn-workers mailing list