ssl_certlocation, etc. will copy any file

Bug #1837690 reported by Paul Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apache2 Charm
New
Undecided
Unassigned

Bug Description

ssl_certlocation and friends are documented to copy files from ${CHARM_DIR}/data, but in fact they will copy a file from anywhere on the system, due to the way that os.path.join handles arguments that begin with "/":

>>> os.path.join('/a', 'b', 'c')
'/a/b/c'
>>> os.path.join('/a', 'b', '/c')
'/c'
>>> _

These config items should probably sanitized before use.

---

From a quick survey of our internal deployment configs, these config items are never used as intended and only for its side-effect of being available as a vhost template variable. If the file is not found, the charm logs this and continues.

Given that this charm is more and more likely to be used directly from the charm store, perhaps we should just remove the file-copying functionality and leave the template variables.

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.