From fdbd89e09403ca9f4bb8a1ef653da29068871589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Wed, 18 Oct 2017 14:56:32 +0200 Subject: [PATCH 1/2] Disable unsupported USB tokens --- .../src/main/res/xml/usb_device_filter.xml | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/OpenKeychain/src/main/res/xml/usb_device_filter.xml b/OpenKeychain/src/main/res/xml/usb_device_filter.xml index 5db692bf6..2e114552b 100644 --- a/OpenKeychain/src/main/res/xml/usb_device_filter.xml +++ b/OpenKeychain/src/main/res/xml/usb_device_filter.xml @@ -8,35 +8,35 @@ Note that values are decimal. --> - + - + - + - + - - - - - - - - - - - - + - - - - - + + + + + + + + + + + + + - + + + + \ No newline at end of file From f2cda5dd6c23d56dd2d3880a6f7207f4d219a8fc Mon Sep 17 00:00:00 2001 From: Wiktor Kwapisiewicz Date: Wed, 18 Oct 2017 21:20:25 +0200 Subject: [PATCH 2/2] Accept dash character (-) in GitHub user names when checking for Gist URL GitHub allows dash / minus characters in usernames (e.g. "wiktor-k" or "open-keychain"). This change extends the regular expression to capture this missing character. --- .../keychain/linked/resources/GithubResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/linked/resources/GithubResource.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/linked/resources/GithubResource.java index 2e06b594f..89dd24b00 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/linked/resources/GithubResource.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/linked/resources/GithubResource.java @@ -192,7 +192,7 @@ public class GithubResource extends LinkedTokenResource { return null; } - Pattern p = Pattern.compile("https://gist\\.github\\.com/([a-zA-Z0-9_]+)/([0-9a-f]+)"); + Pattern p = Pattern.compile("https://gist\\.github\\.com/([a-zA-Z0-9_-]+)/([0-9a-f]+)"); Matcher match = p.matcher(uri.toString()); if (!match.matches()) { return null;