Commit 71aac680 by Jérome Perrin

ERP5Security: ERP5AccessTokenExtractionPlugin only work with HTTPRequest

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