Commit 3b0291d0 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Security: ERP5AccessTokenExtractionPlugin only work with HTTPRequest

This fallback seems useless in this context, getClientAddr should be
available.
parent 29a950af
...@@ -67,10 +67,7 @@ class ERP5AccessTokenExtractionPlugin(BasePlugin): ...@@ -67,10 +67,7 @@ class ERP5AccessTokenExtractionPlugin(BasePlugin):
if token: if token:
creds['erp5_access_token_id'] = token creds['erp5_access_token_id'] = token
creds['remote_host'] = request.get('REMOTE_HOST', '') creds['remote_host'] = request.get('REMOTE_HOST', '')
try: creds['remote_address'] = request.getClientAddr()
creds['remote_address'] = request.getClientAddr()
except AttributeError:
creds['remote_address'] = request.get('REMOTE_ADDR', '')
return creds return creds
####################### #######################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment