From 123c529ffa19e5b2fe80ff94222fc918789ae4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 4 Apr 2014 11:32:54 +0200 Subject: [PATCH] appmenus: extend allowed chars set for Windows paths --- appmenus-scripts/qubes-receive-appmenus | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appmenus-scripts/qubes-receive-appmenus b/appmenus-scripts/qubes-receive-appmenus index b9a279b..70931c9 100755 --- a/appmenus-scripts/qubes-receive-appmenus +++ b/appmenus-scripts/qubes-receive-appmenus @@ -45,8 +45,8 @@ fields_regexp = { "Name": std_re, "GenericName": std_re, "Comment": std_re, - "Categories": re.compile(r"^[a-zA-Z0-9/.; -]*$"), - "Exec": re.compile(r"^[a-zA-Z0-9()%&>/\\:.= -]*$"), + "Categories": re.compile(r"^[a-zA-Z0-9/.;:'() -]*$"), + "Exec": re.compile(r"^[a-zA-Z0-9()%&>/{}\"\\:.= -]*$"), "Icon": re.compile(r"^[a-zA-Z0-9/_.-]*$"), } @@ -88,8 +88,8 @@ def get_appmenus(vm): row_no = 0 appmenus = {} - line_rx = re.compile(r"([a-zA-Z0-9-.]+.desktop):([a-zA-Z0-9-]+(?:\[[a-zA-Z@_]+\])?)=(.*)") - ignore_rx = re.compile(r".*([a-zA-Z0-9-.]+.desktop):(#.*|\s+)$") + line_rx = re.compile(r"([a-zA-Z0-9.()-]+.desktop):([a-zA-Z0-9-]+(?:\[[a-zA-Z@_]+\])?)=(.*)") + ignore_rx = re.compile(r".*([a-zA-Z0-9.-]+.desktop):(#.*|\s+)$") for untrusted_line in untrusted_appmenulist: # Ignore blank lines and comments if len(untrusted_line) == 0 or ignore_rx.match(untrusted_line):