Skip to content

Allow utils to handle escaped regexes and a wider range of expressions.

buzzingwires requested to merge buzzingwires/apparmor:backslash_fix into master

When converting from AppArmor regexes to Python regexes, checks are made to skip normally significant characters that are preceded by regexes. Additionally, ^ and $ are also backslash escaped when converting expressions from logs to AppArmor regexes. This should make it possible to handle expressions such as the following (which would previously cause a crash):

/usr/lib/firefox{,-[0-9]*}/firefox{,*[^s][^h]}


An additional question: Should the documentation be updated to mention that escape characters are accepted in AAREs, now?

Edited by buzzingwires

Merge request reports