Ticket #15930: django.diff

File django.diff, 643 bytes (added by rickeyski, 4 years ago)

svn diff of bug fix

  • common.py

     
    4141        # Check for denied User-Agents
    4242        if 'HTTP_USER_AGENT' in request.META:
    4343            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']):
    4545                    logger.warning('Forbidden (User agent): %s' % request.path,
    4646                        extra={
    4747                            'status_code': 403,
Back to Top