Vertical bar "|" in author name causes ConstraintError

Bug #1220348 reported by FaceDeer on 2013-09-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

I was messing around with the FanFictionDownloader plugin and came across a story, http://www.fimfiction.net/story/40187/, whose author had a "|" character in his name. This caused FFDL to choke so I investigated further and found some odd behavior, which I detailed here: http://www.mobileread.com/forums/showpost.php?p=2611228&postcount=1742

The part that's important for Calibre in general is that if I edit an author's name to add a "|" character into it I get

File "site-packages\calibre\db\legacy.py", line 458, in set_metadata
File "site-packages\calibre\db\cache.py", line 56, in ans
File "site-packages\calibre\db\cache.py", line 1123, in set_metadata
File "site-packages\calibre\db\cache.py", line 1110, in set_field
File "site-packages\calibre\db\cache.py", line 931, in set_field
File "site-packages\calibre\db\write.py", line 505, in set_books
File "site-packages\calibre\db\write.py", line 367, in many_many
File "site-packages\calibre\db\write.py", line 243, in get_db_id
File "site-packages\calibre\db\backend.py", line 287, in execute
File "c:\cygwin\home\kovid\sw\build\apsw-3.7.14.1-r1\src\cursor.c", line 231, in resetcursor
ConstraintError: ConstraintError: column name is not unique

This doesn't appear to be an FFDL-specific bug, it looks like perhaps the value just isn't being properly sanitized or encoded.

When the problem arose via FFDL Calibre was also put into an inconsistent state, the main library grid listed the author with a comma in place of the bar but the metadata edit window showed the author's name with a bar. There's more detail about that in the forum post linked above, I don't know whether this is a separate issue or something FFDL-specific.

This is with Calibre 1.1.0

FaceDeer (derksenmobile) on 2013-09-03
description: updated

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers