[erlang-questions] Strings - deprecated functions

Fred Hebert mononcqc@REDACTED
Fri Nov 24 16:32:10 CET 2017


On 11/24, bengt e wrote:
>Greetings,
>
>Would something like 'go fix' be possible for Erlang, in this particular
>case?
>

Not really. Functions like string:chr return a position of a matching 
character. There is no telling what that position will be used for later 
on.

Another example is the ssl_verify_fun library. That one does hostname 
validation for SSL certificates. Replacing string functions working on 
ASCII/latin-1/ISO-8859-1 by unicode-aware strings that do normalization 
and whatnot is actually a potential security risk.

Those are not entirely equivalent problem domains, and not all strings 
are equivalent in all contexts and encodings.



More information about the erlang-questions mailing list