oops on $team/+reassign page when entering "%"

Bug #413287 reported by Edwin Grubbs
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Unassigned

Bug Description

This is not a security vulnerability since arbitrary sql can't be injected. The '%' is just not escaped, so psycopg's variable substitution blows up.

The ValidPersonOrTeamVocabulary uses SQL() to add hand-coded sql to a storm query. When it does this, it uses python string substitutions. Instead, we should use the optional second argument to SQL() to pass in the variables, which will escape them properly.
For example:
   SQL('SELECT name FROM person WHERE id = ? AND displayname = ?', (33, 'foo'))

This should also eliminate the need to use quote() and quote_like() on the parameters.

OOPS-1321S1050

Tags: lp-registry

Related branches

Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: Undecided → Low
status: New → Triaged
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: none → 3.1.11
Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Revision history for this message
Curtis Hovey (sinzui) wrote :

Fixed in launchpad devel r9933.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Revision history for this message
Curtis Hovey (sinzui) wrote : Bug 413287 Fix released

Fixed released in launchpad-project 3.1.11.

Changed in launchpad-registry:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
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.