validChars

Moderator: Project members

Post Reply
Message
Author
checkitout
500 Command not understood
Posts: 4
Joined: 2019-04-24 14:48

validChars

#1 Post by checkitout » 2019-04-25 13:44

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?

User avatar
botg
Site Admin
Posts: 32404
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: validChars

#2 Post by botg » 2019-04-25 14:09

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.

Post Reply