ConnectionString assumes that values are in \w+

Bug #843412 reported by William Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
William Grant

Bug Description

canonical.database.postgresql.ConnectionString assumes that values are in \w+, which conveniently truncates production DB hosts (which contain hyphens). The libpq parser conninfo_parse (src/interfaces/libpq/fe-connect.c) places no such restriction, reading up to the next space (ignoring its quote support).

ConnectionString needs to be fixed to use something like [^ ]+. Ideally we'd support quoting too, but that would require a full ugly parser and isn't necessary... we should just restrict escaped or quoted values for now.

Tags: regression

Related branches

Changed in launchpad:
status: In Progress → Opinion
status: Opinion → Fix Committed
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
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.