Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usernames are not XML-char safe #759

Closed
gravitystorm opened this issue Jun 15, 2014 · 2 comments
Closed

Usernames are not XML-char safe #759

gravitystorm opened this issue Jun 15, 2014 · 2 comments

Comments

@gravitystorm
Copy link
Collaborator

Usernames are changed directly through the web site, and don't go via the API. This means they can contain non-XML safe characters.

This isn't a problem using any XML API or dump, but could cause problems with e.g. history dumps.

They should be stripped of non-XML characters, c.f.

# strip characters which are invalid in XML documents from the strings

@tomhughes
Copy link
Member

I've excluded the basic ASCII control characters in 32c385e.

@tomhughes
Copy link
Member

I've blocked the byte order markers as well now, in 0cc579b.

The only other thing we should be blocking is surrogates, but ruby literally won't let you write them as a range, presumably because it insists on them appearing as a valid pair which it would then decode into a single codepoint, so it's likely it will do the same if receiving them from the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants