unicode-rs / unicode-security

Detect possible security problems with Unicode usage according to Unicode Technical Standard #39 rules.
Other
14 stars 4 forks source link

Implement detect restriction level #9

Closed crlf0710 closed 4 years ago

crlf0710 commented 4 years ago

This is a draft implementation. I implemented the algorithm itself, however there's a Recommended script concept which is defined in TR31. For now this is_recommended() method is not defined.

Manishearth commented 4 years ago

I'd have the API take a RestrictionLevel and return bool instead

crlf0710 commented 4 years ago

OK. And where should we implement the is_recommended() API? Should we add it to unicode-script?

Manishearth commented 4 years ago

Yes, please add it to unicode-script. While you're at it can you split the public intersect() method into a self -> Self intersection() and a &mut self intersect() or intersect_with()?

crlf0710 commented 4 years ago

ok. I'll create a branch and PR when i return from work today.

Manishearth commented 4 years ago

I made the changes upstream.