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

Ghostbusters record UTF-8 check depends on non-standard C.UTF-8 locale #41

Open
rhansen opened this issue Feb 25, 2016 · 0 comments
Open
Labels

Comments

@rhansen
Copy link
Member

rhansen commented Feb 25, 2016

check_ghostbusters_content() in lib/rpki/cms/roa_validate.c checks to see if the Ghostbusters payload is valid UTF-8 by temporarily switching the locale character type to C.UTF-8. This locale is non-standard and does not exist on all systems, so RPSTIR skips the check if that locale is not available. This causes the badGBRNotVCard.gbr conformance test case to fail on such systems.

There is a simple MIT-licensed UTF-8 parsing library available, but it does not come with a character property database (e.g., to tell if a character is whitespace). ICU is a more full-featured unicode library.

Note that the badGBRNotVCard.gbr test does not comprehensively test whether the RP accepts Ghostbusters records with non-vCard payloads. The payload in that test is simply non-UTF-8 garbage; RPSTIR rejects non-UTF-8 payloads on systems with a C.UTF-8 locale, but does not reject payloads with valid UTF-8 data even if that payload is not a valid vCard.

@rhansen rhansen added the bug label Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant