If an invalid IPv4 address is entered into the main search field at the top of the page, a generic error page saying "Something went wrong" is displayed.
In fact, this happens if anything thats not understandable by NAV is searched for.
E.g. after a successful search for 123.123.123.123, when searching for "123.345.123.123" the following traceback is produced (sent via e-mail):
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/pymodules/python2.6/nav/web/ipdevinfo/views.py", line 306, in ipdev_details
processors=[search_form_processor]))
File "/usr/lib/pymodules/python2.6/django/template/context.py", line 149, in __init__
self.update(processor(request))
File "/usr/lib/pymodules/python2.6/nav/django/context_processors.py", line 50, in account_processor
account = get_account(request)
File "/usr/lib/pymodules/python2.6/nav/django/utils.py", line 47, in get_account
login=request._req.session['user']['login'])
File "/usr/lib/pymodules/python2.6/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 336, in get
num = len(clone)
File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 81, in __len__
self._result_cache = list(self.iterator())
File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 269, in iterator
for row in compiler.results_iter():
File "/usr/lib/pymodules/python2.6/django/db/models/sql/compiler.py", line 672, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/lib/pymodules/python2.6/django/db/models/sql/compiler.py", line 727, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/pymodules/python2.6/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
DatabaseError: current transaction is aborted, commands ignored until end of transaction block
If an invalid IPv4 address is entered into the main search field at the top of the page, a generic error page saying "Something went wrong" is displayed.
In fact, this happens if anything thats not understandable by NAV is searched for.
E.g. after a successful search for 123.123.123.123, when searching for "123.345.123.123" the following traceback is produced (sent via e-mail):
Traceback (most recent call last):
File "/usr/lib/ pymodules/ python2. 6/django/ core/handlers/ base.py" , line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/ pymodules/ python2. 6/nav/web/ ipdevinfo/ views.py" , line 306, in ipdev_details [search_ form_processor] ))
processors=
File "/usr/lib/ pymodules/ python2. 6/django/ template/ context. py", line 149, in __init__ update( processor( request) )
self.
File "/usr/lib/ pymodules/ python2. 6/nav/django/ context_ processors. py", line 50, in account_processor request)
account = get_account(
File "/usr/lib/ pymodules/ python2. 6/nav/django/ utils.py" , line 47, in get_account request. _req.session[ 'user'] ['login' ])
login=
File "/usr/lib/ pymodules/ python2. 6/django/ db/models/ manager. py", line 132, in get query_set( ).get(* args, **kwargs)
return self.get_
File "/usr/lib/ pymodules/ python2. 6/django/ db/models/ query.py" , line 336, in get
num = len(clone)
File "/usr/lib/ pymodules/ python2. 6/django/ db/models/ query.py" , line 81, in __len__ _result_ cache = list(self. iterator( ))
self.
File "/usr/lib/ pymodules/ python2. 6/django/ db/models/ query.py" , line 269, in iterator results_ iter():
for row in compiler.
File "/usr/lib/ pymodules/ python2. 6/django/ db/models/ sql/compiler. py", line 672, in results_iter sql(MULTI) :
for rows in self.execute_
File "/usr/lib/ pymodules/ python2. 6/django/ db/models/ sql/compiler. py", line 727, in execute_sql execute( sql, params)
cursor.
File "/usr/lib/ pymodules/ python2. 6/django/ db/backends/ postgresql_ psycopg2/ base.py" , line 44, in execute execute( query, args)
return self.cursor.
DatabaseError: current transaction is aborted, commands ignored until end of transaction block
<ModPythonRequest /123.345. 123.123/ , {'nav_sessid' : '163431256412ad 08c18e730a2d779 77f'}, INTERFACE' : 'CGI/1.1', application/ xhtml+xml, application/ xml;q=0. 9,*/*;q= 0.8', ACCEPT_ CHARSET' : 'ISO-8859- 1,utf-8; q=0.7,* ;q=0.3' , ACCEPT_ ENCODING' : 'gzip,deflate, sdch', ACCEPT_ LANGUAGE' : 'nb-NO, nb;q=0. 8,no;q= 0.6,nn; q=0.4,en- US;q=0. 2,en;q= 0.2', AUTHORIZATION' : 'Basic bGFyczo=', 163431256412ad0 8c18e730a2d7797 7f', example. com', 158.38. 112.72/ ipdevinfo/ ip=123. 123.123. 123/', 123.345. 123.123/ ',
path:/ipdevinfo
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:
META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0,
'CONTENT_TYPE': None,
'GATEWAY_
'HTTP_ACCEPT': 'text/html,
'HTTP_
'HTTP_
'HTTP_
'HTTP_
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'nav_sessid=
'HTTP_HOST': 'mynav.
'HTTP_REFERER': 'http://
'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'PATH_INFO': u'/ipdevinfo/
'PATH_TRANSLATED': None,
'QUERY_STRING': None,
'REMOTE_ADDR': '129.241.104.246',
'REMOTE_HOST': None,
'REMOTE_IDENT': None,
'REMOTE_USER': None,
'REQUEST_METHOD': 'GET',
'SCRIPT_NAME': '',
'SERVER_NAME': '127.0.0.1',
'SERVER_PORT': 80,
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'mod_python'}>
Error is also produced when random characters are searched for, with similar traceback.