Page 1 of 1

validChars

Posted: 2019-04-25 13:44
by checkitout
Hi all.
When FileZilla Server is generating salt for passwords in Accounts.cpp it uses these characters:
char const validChars[] = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
But some of those aren't allowed in XML so need to be escaped.
< = &lt;
> = &gt;
& = &amp;
So I think those characters should be removed, leaving:
char const validChars[] = "!\"#$%'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
That's still many characters.
Does that make sense?

Re: validChars

Posted: 2019-04-25 14:09
by botg
But some of those aren't allowed in XML so need to be escaped.
Yes, that's why you need to escape them when writing them into an XML document.