mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Limit search query length to 1000 characters
This commit is contained in:
@ -116,6 +116,12 @@ def search(request):
|
||||
})
|
||||
query = request.REQUEST['q']
|
||||
|
||||
# Anti-stefan prevention
|
||||
if len(query) > 1000:
|
||||
return render_to_response('search/sitesearch.html', {
|
||||
'search_error': "Search term too long.",
|
||||
})
|
||||
|
||||
# Is the request being paged?
|
||||
if request.REQUEST.has_key('p'):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user