uploads with null characters in debian/copyright get rejected

Bug #1842919 reported by Matthias Klose on 2019-09-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
High
Tom Wardill

Bug Description

<doko> Rejected:
<doko> A string literal cannot contain NUL (0x00) characters.
<doko> emscripten (1.22.1-1build2) eoan; urgency=medium
<doko> but where is that char?
<cjwatson> The copyright file I believe

<cjwatson> doko: It looks like data corruption on line 6324 of debian/copyright FWIW
<cjwatson> Files: tests/sdl_canvas_palette_g.png
<cjwatson> ./tests/sdl_canvas_palette_g.png
<cjwatson> Copyright: D<80>^@^A^B^D^H^Ph, `5^NÏè^D^H^P @<80>@M^A^E«f.¦"@<80>^@^A^B^D^Z^K(X<8d>Ã3:^A^B^D^H^P PS@Áª<99><8b>^H^P @<80>^@<81>Æ^B
<cjwatson> says vim
<doko> yep
<cjwatson> Maybe auto-extracted by something that ended up dumping in binary data or something
<doko> and removed in Debian
<doko> ahh, no, my bad
<cjwatson> Yes, that string is auto-extracted - it appears at byte position 2256 of tests/sdl_canvas_palette_g.png
<cjwatson> Immediately after something that happens to be "©" :-)
<cjwatson> (i.e. U+00A9 COPYRIGHT SIGN)

Related branches

Colin Watson (cjwatson) wrote :

Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/archiveuploader/nascentupload.py", line 710, in do_accept
    self.storeObjectsInDatabase(build=build)
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/archiveuploader/nascentupload.py", line 812, in storeObjectsInDatabase
    sourcepackagerelease = self.changes.dsc.storeInDatabase(build)
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/archiveuploader/dscfile.py", line 721, in storeInDatabase
    buildinfo=buildinfo_lfa,
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/registry/model/distroseries.py", line 1215, in createUploadedSourcePackageRelease
    buildinfo=buildinfo)
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/soyuz/model/sourcepackagerelease.py", line 147, in __init__
    self.copyright = copyright
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/soyuz/model/sourcepackagerelease.py", line 173, in copyright
    (content, self.id))
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/store.py", line 109, in execute
    return self._connection.execute(statement, params, noresult)
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/databases/postgres.py", line 306, in execute
    return Connection.execute(self, statement, params, noresult)
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/database.py", line 241, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/databases/postgres.py", line 316, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/database.py", line 372, in raw_execute
    self._prepare_execution(raw_cursor, params, statement)
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/database.py", line 404, in _prepare_execution
    statement, params or ())
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/database.py", line 454, in _check_disconnect
    return function(*args, **kwargs)
  File "/srv/launchpad.net/production/launchpad-rev-19044/env/local/lib/python2.7/site-packages/storm/tracer.py", line 248, in trace
    attr(*args, **kwargs)
  File "/srv/launchpad.net/production/launchpad-rev-19044/lib/lp/services/webapp/adapter.py", line 684, in connection_raw_execute
    statement, tuple(connection.to_database(params)))
ValueError: A string literal cannot contain NUL (0x00) characters.

Tom Wardill (twom) on 2019-09-05
Changed in launchpad:
status: New → In Progress
assignee: nobody → Tom Wardill (twom)
Colin Watson (cjwatson) on 2019-09-05
tags: added: lp-soyuz soyuz-upload
Changed in launchpad:
importance: Undecided → High
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Tom Wardill (twom) on 2019-09-09
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson) on 2019-09-13
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers