also harden the view
parent
bb9bd032b1
commit
6d3c5f2aca
|
@ -2220,7 +2220,11 @@ def search(request):
|
|||
q = request.GET.get('q', '')
|
||||
ty = request.GET.get('ty', 'g') # ge= 'general, au= 'author'
|
||||
request.session['q']=q
|
||||
page = int(request.GET.get('page', 1))
|
||||
try:
|
||||
page = int(request.GET.get('page', 1))
|
||||
except ValueError:
|
||||
# garbage in page
|
||||
page = 1
|
||||
gbo = request.GET.get('gbo', 'n') # gbo is flag for google books only
|
||||
our_stuff = Q(is_free=True) | Q(campaigns__isnull=False )
|
||||
if q != '' and page==1 and not gbo=='y':
|
||||
|
|
Loading…
Reference in New Issue