You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears the bulk import code for Organization and Room does not attempt to properly validate the syntax of their attr fields, causing a ValueError crash (NAV 4.7.0 and earlier).
As an example, attempting to bulk import this as an Organization:
INGSOC::English Socialism:doubleplusgood
will result in a crash with a traceback that looks like this:
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/nav/web/seeddb/page/organization.py", line 95, in organization_bulk extra_context=info.template_context)
File "/usr/lib/python2.7/dist-packages/nav/web/seeddb/utils/bulk.py", line 46, in render_bulkimport processed = form.bulk_process_check(importer)
File "/usr/lib/python2.7/dist-packages/nav/web/seeddb/forms/bulk.py", line 99, in bulk_process_check for line_num, objects in importer:
File "/usr/lib/python2.7/dist-packages/nav/bulkimport.py", line 49, in next objects = self._create_objects_from_row(row)
File "/usr/lib/python2.7/dist-packages/nav/bulkimport.py", line 215, in _create_objects_from_row attributes = dict([attr.split('=', 1) for attr in row.get('attr', [])])
ValueError: dictionary update sequence element #0 has length 1; 2 is required
The text was updated successfully, but these errors were encountered:
It appears the bulk import code for Organization and Room does not attempt to properly validate the syntax of their
attr
fields, causing a ValueError crash (NAV 4.7.0 and earlier).As an example, attempting to bulk import this as an Organization:
will result in a crash with a traceback that looks like this:
The text was updated successfully, but these errors were encountered: