Blank note content in HTML format causes server oops during HTML to TomboyXML conversion

Bug #538140 reported by Roman Yepishev
104
This bug affects 35 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
Fix Released
High
Roman Yepishev
Nominated for Trunk by temo

Bug Description

STR:

1. Create a note in Tomboy which has title but no content
2. Sync the note to couchdb
3. Modify note_format to be non-xml (i.e. emulate older behavior with HTML in content node)
4. Try to sync the notes:

ERROR:root:WSGI Handled Exception
Traceback (most recent call last):
  File "/home/rtg/canonical/ubuntuone/trunk-2a/utilities/../lib/django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/rtg/canonical/ubuntuone/trunk-2a/utilities/../lib/ubuntuone/web/oauth/decorators.py", line 28, in wrapper
    return func(request, *args, **kwargs)
  File "/home/rtg/canonical/ubuntuone/trunk-2a/utilities/../lib/ubuntuone/account/djangolib/decorators.py", line 30, in wrapper
    return func(request, *args, **kwargs)
  File "/home/rtg/canonical/ubuntuone/trunk-2a/utilities/../lib/ubuntuone/web/notes/views.py", line 250, in api_user_info
    (_, last_sync_revision) = get_notes_for_tomboy (request, None, True, -2)
  File "/home/rtg/canonical/ubuntuone/trunk-2a/utilities/../lib/ubuntuone/web/notes/views.py", line 306, in get_notes_for_tomboy
    note_to_add["note-content"] = HTMLToTomboy(note["content"])
  File "/home/rtg/canonical/ubuntuone/trunk-2a/utilities/../lib/ubuntuone/web/notes/tomboyxml.py", line 159, in HTMLToTomboy
    html_tree = etree.parse(StringIO.StringIO(html), etree.HTMLParser())
  File "lxml.etree.pyx", line 2583, in lxml.etree.parse (src/lxml/lxml.etree.c:25057)
  File "parser.pxi", line 1482, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:63677)
  File "parser.pxi", line 1510, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:63925)
  File "parser.pxi", line 1389, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:62857)
  File "parser.pxi", line 931, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:60016)
  File "parser.pxi", line 542, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:56659)
  File "parser.pxi", line 628, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:57504)
  File "parser.pxi", line 579, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:57049)
XMLSyntaxError: None

Roman Yepishev (rye)
visibility: private → public
Changed in ubuntuone-servers:
assignee: nobody → Rodrigo Moya (rodrigo-moya)
importance: Undecided → Critical
importance: Critical → High
tags: added: desktop+ notes webui
Changed in ubuntuone-servers:
status: New → In Progress
Roman Yepishev (rye)
Changed in ubuntuone-servers:
assignee: Rodrigo Moya (rodrigo-moya) → Roman Yepishev (rye)
Roman Yepishev (rye)
Changed in ubuntuone-servers:
status: In Progress → Fix Committed
Changed in ubuntuone-servers:
status: Fix Committed → Fix Released
Roman Yepishev (rye)
Changed in ubuntuone-servers:
status: Fix Released → Fix Committed
Roman Yepishev (rye)
Changed in ubuntuone-servers:
status: Fix Committed → Fix Released
Revision history for this message
temo (temoog) wrote :

sorry. mistake [ Nominated for Trunk ]

Revision history for this message
Romuald (romu70) wrote :

Hi all,
I do have this issue on 11.10 64. Changed nothing on my PC except the regular updates.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.