mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
GData reduction, security recs for regex
This commit is contained in:
@@ -69,8 +69,6 @@ import gdata
|
||||
import atom
|
||||
import atom.http_interface
|
||||
import atom.token_store
|
||||
import gdata.auth
|
||||
import gdata.gauth
|
||||
|
||||
|
||||
AUTH_SERVER_HOST = 'https://www.google.com'
|
||||
@@ -87,8 +85,6 @@ SCOPE_URL_PARAM_NAME = 'authsub_token_scope'
|
||||
# 'callback' URL which contains the requested scope. This constant is the
|
||||
# default name (AKA key) for the URL parameter.
|
||||
OAUTH_SCOPE_URL_PARAM_NAME = 'oauth_token_scope'
|
||||
# Maps the service names used in ClientLogin to scope URLs.
|
||||
CLIENT_LOGIN_SCOPES = gdata.gauth.AUTH_SCOPES
|
||||
# Default parameters for GDataService.GetWithRetries method
|
||||
DEFAULT_NUM_RETRIES = 3
|
||||
DEFAULT_DELAY = 1
|
||||
@@ -1091,7 +1087,7 @@ class GDataService(atom.service.AtomService):
|
||||
location = (server_response.getheader('Location')
|
||||
or server_response.getheader('location'))
|
||||
if location is not None:
|
||||
m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
|
||||
m = re.compile('[?&]gsessionid=(\w*)').search(location)
|
||||
if m is not None:
|
||||
self.__gsessionid = m.group(1)
|
||||
return GDataService.Get(self, location, extra_headers, redirects_remaining - 1,
|
||||
@@ -1339,7 +1335,7 @@ class GDataService(atom.service.AtomService):
|
||||
location = (server_response.getheader('Location')
|
||||
or server_response.getheader('location'))
|
||||
if location is not None:
|
||||
m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
|
||||
m = re.compile('[?&]gsessionid=(\w*)').search(location)
|
||||
if m is not None:
|
||||
self.__gsessionid = m.group(1)
|
||||
return GDataService.PostOrPut(self, verb, data, location,
|
||||
@@ -1437,7 +1433,7 @@ class GDataService(atom.service.AtomService):
|
||||
location = (server_response.getheader('Location')
|
||||
or server_response.getheader('location'))
|
||||
if location is not None:
|
||||
m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
|
||||
m = re.compile('[?&]gsessionid=(\w*)').search(location)
|
||||
if m is not None:
|
||||
self.__gsessionid = m.group(1)
|
||||
return GDataService.Delete(self, location, extra_headers,
|
||||
|
||||
Reference in New Issue
Block a user