File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323200 /drafts/?first_name=joe
2424200 /drafts/?other_group=irtf
2525200 /drafts/?wg_id=1682
26+ 200 /drafts/?filename=%EF%BD%8C #non-ASCII
2627200,heavy /drafts/_test/all_id.txt
2728200,heavy /drafts/_test/id_index.txt
2829200,heavy /drafts/_test/id_abstracts.txt
Original file line number Diff line number Diff line change @@ -151,6 +151,14 @@ def search(request):
151151 if key in args :
152152 searching = True
153153 if searching :
154+ # Non-ASCII strings don't match anything; this check
155+ # is currently needed to avoid complaints from MySQL.
156+ for k in ['filename' ,'last_name' ,'first_name' ]:
157+ try :
158+ tmp = str (args .get (k , '' ))
159+ except :
160+ args [k ] = '*NOSUCH*'
161+
154162 # '0' and '-1' are flag values for "any"
155163 # in the original .cgi search page.
156164 # They are compared as strings because the
Original file line number Diff line number Diff line change 2323200,heavy /idtracker/?sub_state_id=6
2424200 /idtracker/?search_area_acronym=1260
2525200 /idtracker/?search_group_acronym=tls
26+ 200 /idtracker/?search_group_acronym=%EF%BD%8C #non-ASCII
27+ 200 /idtracker/?search_filename=%EF%BD%8C #non-ASCII
2628200 /feed/last-call/
2729
2830# An RFC with no matching value in InternetDrafts. This tests
Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ def search(request):
5656 if form .is_valid () == False :
5757 searching = False
5858 if searching :
59+ # Non-ASCII group/filename doesn't match anything; this check
60+ # is currently needed to avoid complaints from MySQL.
61+ for k in ['search_group_acronym' ,'search_filename' ]:
62+ try :
63+ tmp = str (args .get (k , '' ))
64+ except :
65+ args [k ] = '*NOSUCH*'
66+
5967 group = args .get ('search_group_acronym' , '' )
6068 if group != '' :
6169 rfclist = [rfc ['rfc_number' ] for rfc in Rfc .objects .all ().filter (group_acronym = group ).values ('rfc_number' )]
You can’t perform that action at this time.
0 commit comments