report items cannot have spaces in their names

Bug #428585 reported by Kees Cook
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Won't Fix
Undecided
Unassigned
firefox-3.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: apport

hook /usr/share/apport/package-hooks//firefox-3.5.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport/report.py", line 620, in add_hooks_info
    symb['add_info'](self)
  File "/usr/share/apport/package-hooks//firefox-3.5.py", line 150, in add_info
    report['profile_%s_pluginreg.dat' % profile_name] = open(pluginreg_dat).read()
  File "/usr/lib/python2.6/dist-packages/problem_report.py", line 479, in __setitem__
    assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()

"profile_name" in this case is "Test Profile". I think problem_report.py __setitem__ needs to drop spaces as well...

ProblemType: Bug
Architecture: amd64
CrashReports:
 600:501:501:5311101:2009-09-11 15:51:05.000000000 -0700:2009-09-11 15:51:06.000000000 -0700:/var/crash/_usr_bin_evince.501.crash
 600:501:501:6924117:2009-09-10 15:37:54.000000000 -0700:2009-09-10 15:37:55.000000000 -0700:/var/crash/_usr_bin_totem.501.crash
 600:501:501:66116895:2009-09-12 13:21:08.000000000 -0700:2009-09-12 13:21:09.000000000 -0700:/var/crash/_usr_lib_firefox-3.5.3_firefox.501.crash
 600:501:501:1670868:2009-09-11 09:43:04.000000000 -0700:2009-09-11 09:43:05.000000000 -0700:/var/crash/_usr_lib_games_overgod_overgod.501.crash
 600:501:501:46276209:2009-09-11 09:42:54.000000000 -0700:2009-09-11 09:42:55.000000000 -0700:/var/crash/_usr_lib_firefox-3.5.2_firefox.501.crash
Date: Sat Sep 12 13:22:56 2009
DistroRelease: Ubuntu 9.10
Package: python-problem-report 1.9-0ubuntu3
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-10.30-generic
SourcePackage: apport
Uname: Linux 2.6.31-10-generic x86_64

Revision history for this message
Kees Cook (kees) wrote :
Revision history for this message
Kees Cook (kees) wrote :

It's not clear to me if allowing " " is safe, though, looking through how the keys are used. Deferring to Martin on this...

Revision history for this message
Martin Pitt (pitti) wrote :

I don't like spaces in key names, that's too error prone IMHO.

BTW,__setitem__() does not alter any key name, the replaces() are just for filtering out allowed characters so that the remainders can be checked with isalnum(). replace() doesn't change the original string.

Changed in apport (Ubuntu):
status: New → Won't Fix
Changed in firefox-3.5 (Ubuntu):
status: New → Confirmed
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.