Searching for invalid IP4 address causes "Something went wrong" error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
New
|
Undecided
|
Unassigned |
Bug Description
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/
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/
processors=
File "/usr/lib/
self.
File "/usr/lib/
account = get_account(
File "/usr/lib/
login=
File "/usr/lib/
return self.get_
File "/usr/lib/
num = len(clone)
File "/usr/lib/
self.
File "/usr/lib/
for row in compiler.
File "/usr/lib/
for rows in self.execute_
File "/usr/lib/
cursor.
File "/usr/lib/
return self.cursor.
DatabaseError: current transaction is aborted, commands ignored until end of transaction block
<ModPythonRequest
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.
This is for NAV version 3.12.2