Opened 5 years ago

Closed 5 years ago

#15930 closed Bug (invalid) doesn't parse denied_user_agents

Reported by: rickeyski Owned by: nobody
Component: HTTP handling Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:


I tried to set denied user agents and django raised the error str does not have method .search for Changing the declaration to,request.METAuser agent?) fixed the problem. The diff is attached

Attachments (1)

django.diff (643 bytes) - added by rickeyski 5 years ago.
svn diff of bug fix

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by rickeyski

svn diff of bug fix

comment:1 Changed 5 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

The docs state that settings.DISALLOWED_USER_AGENTS must be a "list of compiled regular expression objects".


You have provided a list of strings instead.

You should write DISALLOWED_USER_AGENTS = (re.compile(....), ...)

Note: See TracTickets for help on using tickets.
Back to Top