canonical_names in Openstack's ApacheSSLContext strips important characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
New
|
Undecided
|
Unassigned |
Bug Description
The canonical names method on ApacheSSLContext uses lstrip to remove the leading 'ssl_key_' from relation keys in order to determine the canonical name that that key represents.
The problem is that lstrip will continue to strip leading characters beyond ssl_key_ for any characters in the set [sl_key]. So a key like ssl_key_
Presumably this method is usually overridden in subclasses, which is why the bug has gone unnoticed for so long, but who knows?
This is a quick and easy fix:
=== modified file 'charmhelpers/
--- charmhelpers/
+++ charmhelpers/
@@ -755,7 +755,7 @@
- cns.append(
+ cns.append(k[8:])
return sorted(
John