remove csrf check in urlopen

This commit is contained in:
mohammed akmal miah 2022-01-17 12:33:05 +00:00
parent 16541c522e
commit e4d52818fc
1 changed files with 2 additions and 6 deletions

View File

@ -97,12 +97,8 @@ class RefineServer(object):
try: try:
response = urllib2.urlopen(req) response = urllib2.urlopen(req)
except urllib2.HTTPError as e: except urllib2.HTTPError as e:
if 'Missing or invalid csrf_token parameter' == e.msg: raise Exception('HTTP %d "%s" for %s\n\t%s' %
self.get_csrf_token() (e.code, e.msg, e.geturl(), data))
params['csrf_token'] = self.token
response = urllib2.urlopen(req)
else:
raise Exception('HTTP %d "%s" for %s\n\t%s' % (e.code, e.msg, e.geturl(), data))
except urllib2.URLError as e: except urllib2.URLError as e:
raise urllib2.URLError( raise urllib2.URLError(
'%s for %s. No Refine server reachable/running; ENV set?' % '%s for %s. No Refine server reachable/running; ENV set?' %