Closed guidovranken closed 9 years ago
Thanks, @guidovranken. It seems to already prevent non-numeric PREfixes, but not suffixes (for reasons I don't completely understand). In any event, I included the ^
just to be safe :smile:
Thank you both for identifying and fixing this issue. BTW, I frequently use this for testing regexes (is that the plural of regex? who knows): http://regexpal.com/
-Mark
https://github.com/TAXIIProject/libtaxii/blob/master/libtaxii/validation.py#L24
This:
should probably be this:
I noticed this in a manual code analysis of libtaxii and I haven't tested it in a live install of libtaxii, but:
In other words, the current regex in validation.py matches all strings that start with one or more numeric characters but does not prohibit non-numeric suffixes (and the TAXII 1.0 spec dictates only numeric characters to be used as message ID's). My proposed regex fixes that.