Ticket #15930: django.diff
File django.diff, 643 bytes (added by , 14 years ago) |
---|
-
common.py
41 41 # Check for denied User-Agents 42 42 if 'HTTP_USER_AGENT' in request.META: 43 43 for user_agent_regex in settings.DISALLOWED_USER_AGENTS: 44 if user_agent_regex.search(request.META['HTTP_USER_AGENT']):44 if re.search(user_agent_regex, request.META['HTTP_USER_AGENT']): 45 45 logger.warning('Forbidden (User agent): %s' % request.path, 46 46 extra={ 47 47 'status_code': 403,