From 808f1ad15615731ccc8a15a55a1c98fd54272caf Mon Sep 17 00:00:00 2001 From: adeelehsan Date: Thu, 5 Sep 2019 15:10:53 +0500 Subject: [PATCH] user agent regex updated in mobile platform learner-3838 --- lms/djangoapps/mobile_api/mobile_platform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/mobile_api/mobile_platform.py b/lms/djangoapps/mobile_api/mobile_platform.py index 4fac4e24a0..727d80c382 100644 --- a/lms/djangoapps/mobile_api/mobile_platform.py +++ b/lms/djangoapps/mobile_api/mobile_platform.py @@ -56,7 +56,7 @@ class MobilePlatform(six.with_metaclass(abc.ABCMeta)): class IOS(MobilePlatform): """ iOS platform """ - USER_AGENT_REGEX = (r'\((?P[0-9]+.[0-9]+.[0-9]+(.[0-9a-zA-Z]*)?); OS Version [0-9.]+ ' + USER_AGENT_REGEX = (r'\((?P[0-9]+.[0-9]+.[0-9]+(\.[0-9a-zA-Z]*)?); OS Version [0-9.]+ ' r'\(Build [0-9a-zA-Z]*\)\)') NAME = "iOS" @@ -64,7 +64,7 @@ class IOS(MobilePlatform): class Android(MobilePlatform): """ Android platform """ USER_AGENT_REGEX = (r'Dalvik/[.0-9]+ \(Linux; U; Android [.0-9]+; (.*) Build/[0-9a-zA-Z]*\) ' - r'(.*)/(?P[0-9]+.[0-9]+.[0-9]+(.[0-9a-zA-Z]*)?)') + r'(.*)/(?P[0-9]+.[0-9]+.[0-9]+(\.[0-9a-zA-Z]*)?)') NAME = "Android"