Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 162825 - "Advisory Notes" text can cause python traceback
Summary: "Advisory Notes" text can cause python traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Infrastructure
Classification: Retired
Component: update system
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Bill Nottingham
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-08 22:53 UTC by Jason Vas Dias
Modified: 2016-09-20 02:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-08 23:18:03 UTC


Attachments (Terms of Use)

Description Jason Vas Dias 2005-07-08 22:53:03 UTC
Description of problem:

The first time I used the new fedora update page to create a dhcp update,
I entered some "Advisory Notes" text, and got this python traceback:
"
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File
"/usr/src/build/513032-i386/install/usr/lib/python2.2/site-packages/mod_python/apache.py",
line 332, in HandlerDispatch

  File
"/usr/src/build/513032-i386/install/usr/lib/python2.2/site-packages/mod_python/publisher.py",
line 199, in handler

  File "/mnt/redhat/fedora-updates/add.py", line 63, in add_update
    db.query(query)

  File "/mnt/redhat/fedora-updates/db.py", line 47, in query
    db.query(q)

_pg.error: ERROR:  parser: parse error at or near "headers" at character 705
"

I had tried to enter this "Advisory Notes" text :

"
- Fixes possible network flood on repeated DHCPDECLINE (bugs 159929, 162080)
- Removes 1-5 second delay on dhclient startup if only one interface being
configured
- make dhclient not emit ISC blurb on error exit
- dhclient-script fixes:
    o remove 1 second sleep on PREINIT
    o further replacement of /sbin/route by /sbin/ip
    o fix determination of runlevel in init state 1
    o add class A,B,C static route support
    o add ARPCHECK / ARPSEND support
o fix bug 151023: dhclient RPM description claimed 'headers and libraries'
"

Removing all "Advisory Notes" text allowed me to submit the FC3 update
( dhcp-3.0.1-44_FC3  	FC3 	Final 		none 	 	2005-07-08 )

On further consideration it appears the quoted string "'headers" could
have been the cause of the problem - you should escape single-quotes
with a backslash ("\\'") in "Advisory Notes" text before attempting to
insert the string in the database. 

Version-Release number of selected component (if applicable):


How reproducible:
probably 100% - don't want to raise another fedora update to test :)

Steps to Reproduce:
1. Create Fedora Update with "Advisory Notes" text containing "'" quoted string
  
Actual results:
Python traceback

Expected results:
Submitted Fedora update

Comment 1 Luke Macken 2005-07-08 23:18:03 UTC
notes = notes.replace('\'', '\\\'') should do the trick.  Thanks for the report.

By the way, you can add (and remove) as many updates as you want in the future,
because the Release Team doesn't hear about it until you click "Submit to
Release Team".


Note You need to log in before you can comment on or make changes to this bug.