Can't install snaps that have .. *anywhere* in filename

Bug #1446820 reported by Michael Terry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
Michael Terry
15.04
Fix Released
Critical
Michael Terry

Bug Description

When playing with deb2snap and creating a snap that included ca-certificates, I ran into the problem that snappy would refuse to install the snap with the following error:

 snap contains invalid content

It turns out that deb.go has the following verify check:

 path = filepath.Clean(path)
 if strings.Contains(path, "..") {
  return "", ErrSnapInvalidContent
 }

But that's too simplistic. Consider the file that is choking:

/usr/share/ca-certificates/mozilla/AC_Raíz_Certicámara_S.A..crt

That should probably be allowed.

(Also it would help if that error message printed the bad path.)

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :

Good point, thanks!

Changed in snappy-ubuntu:
importance: Undecided → Critical
status: New → Triaged
Michael Terry (mterry)
Changed in snappy-ubuntu:
status: Triaged → Fix Committed
affects: snappy-ubuntu → snappy
Changed in snappy:
status: Fix Committed → Fix Released
Changed in snappy:
assignee: nobody → Michael Terry (mterry)
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.