templating.renders 'fixes' directories to be world readable

Bug #1478940 reported by Stuart Bishop
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Released
Undecided
Stuart Bishop

Bug Description

templating.render accepts a mode argument, tricking the developer into thinking it might be secure, but then proceeds to reset the permissions of the parent directory to a hard coded world-readable:

   host.mkdir(os.path.dirname(target), owner, group, perms=0o755)

Directories should only be created in this fashion if explicitly asked for, rather than having potentially insecure behaviour by default.

Related branches

Stuart Bishop (stub)
information type: Public → Public Security
Changed in charm-helpers:
status: New → In Progress
assignee: nobody → Stuart Bishop (stub)
Stuart Bishop (stub)
Changed in charm-helpers:
status: In Progress → Fix Committed
Changed in charm-helpers:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.