Skip to content

Add lint to check for suspicious characters in localityName and/or stateOrProvinceName - #1084

Open
defacto64 wants to merge 6 commits into
zmap:masterfrom
defacto64:suspicious_chars_in_address
Open

Add lint to check for suspicious characters in localityName and/or stateOrProvinceName#1084
defacto64 wants to merge 6 commits into
zmap:masterfrom
defacto64:suspicious_chars_in_address

Conversation

@defacto64

Copy link
Copy Markdown
Contributor

After a recent incident seen on Bugzilla, I thought this lint would be good to have. This lint checks whether the Subject's localityName and stateOrProvinceName attributes contain suspicious characters such as comma, colon, parentheses, etc. The presence of such characters almost certainly indicates an incorrect value for the containing attribute. A very common case is when localityName contains two or even three address elements, separated by commas, which is obviously incorrect. For example, there are quite a few certificates in the test corpus where localityName contains not only the locality but also the street address or the state/province. But there are also stranger cases.

Since I am not sure that the presence of such characters is always an error, this lint only returns a warning upon a hit. But if people here believe it's better, it's fine with me to change it to an error. I refined the set of suspect characters (as currently used in this lint) heuristically, so I may have missed some other characters that would be worth including; I'm of course open to changes.

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

Successfully merging this pull request may close these issues.

1 participant