Apport does not ensure tags are valid

Bug #1029479 reported by Martin Packman
20
This bug affects 5 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Apport allows hooks to add arbitrary tags, and passes them through to the launchpad crashdb implementation lowercased but otherwise unmolested. However, launchpad restricts the form of tags and will raise an error both in the api and the web interface otherwise.

    "Tags must start with a letter or number and be lowercase. The characters "+", "-" and "." are also allowed after the first character."

This allows a package to incautiously create an invalid tag, then renders the bug unreportable. See bug 1029471 in the unity packaging for an example of this, which is exacerbated by bug 1024836 in apport masking the real error.

Martin Pitt (pitti)
Changed in apport:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
affects: apport → apport (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk r2487.

Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Martin Packman (gz) wrote :

Thanks Martin! Now, if only I could get the unity packaging change landed so they treat tags more reasonably as well.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.5.2-0ubuntu2

---------------
apport (2.5.2-0ubuntu2) quantal; urgency=low

  * data/general-hooks/ubuntu.py: Add "package-from-proposed" tag if the
    installed package version is available from -proposed, but not from
    -security and -updates. (LP: #1050853)
  * Merge fixes from trunk:
    - data/apportcheckresume: Open report file in binary mode. (LP: #1040353)
    - packaging-apt-dpkg.py: When throwing ValueErrors, show the non-existing
      package name. This makes it easier to debug such crashes.
    - launchpad.py: Replace characters from tags which are not allowed by
      Launchpad with '.' (LP: #1029479)
 -- Martin Pitt <email address hidden> Tue, 18 Sep 2012 14:51:08 +0200

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lockal (lockal) wrote :

This caused crash in _filter_tag_names, see bug 1052754.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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