[Bug 1086997] [NEW] apt-get fails if a package has a space in its Filename

Thomas Bushnell, BSG 1086997 at bugs.launchpad.net
Thu Dec 6 04:05:23 UTC 2012


Thanks for the reference. I apologize for missing section D; it's not
relevant here, but I had forgotten that it has those things. It doesn't
actually say much relevant here.

However, I think section 5.1 is dispositive, so this isn't a bug. It's an
unfortunate restriction, because it ends up meaning that there is no way to
use a directory name with spaces, especially given that the repository
format documentation says that the Filename: "should not make user of any
protocol-specific components, such as URL-encoded parameters", so you can't
put in URL escaping syntax either.

It's worth noting what happens when this is triggered however. It's not
that apt-get splits it into multiple words and forgets part (which 5.1
might suggest); it's that apt-get doesn't form a proper HTTP request
because it passes the spaces through in the HTTP GET where they aren't
allowed. Given that 5.1 says that such a Filename field is misformed, apt
can't be blamed for failing to interpret it correctly.

But this suggests that there isn't any good escaping going on between
Filename: and the HTTP server. Since *any *character--except whitespace--is
permitted in the Filename (as long as it isn't trying to use
"protocol-specific components") it seems that this might run afoul (for
example, semicolons might well cause problems as well given the language of
RFC 2396).

I think apt-get would be very well served to escape Filename:'s when passed
to http or https handlers, and carefully not when passed to file: handlers,
etc. I suspect there are other bugs here which 5.1 is not relevant for,
since it only addresses the specific case of whitespace.

Thomas


On Wed, Dec 5, 2012 at 6:42 PM, Daniel Hartwig <mandyke at gmail.com> wrote:

> Also, there is this statement in section 5.1:
>
> > Whitespace must not appear inside names (of packages,
> > architectures, files or anything else) or version numbers, or
> > between the characters of multi-character version
> > relationships.
>
> --
> You received this bug notification because you are a member of Goobuntu
> Team, which is subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1086997
>
> Title:
>   apt-get fails if a package has a space in its Filename
>
> Status in “apt” package in Ubuntu:
>   New
>
> Bug description:
>   If a package has a space in its Filename: entry in the Packages file,
>   you get errors on HTTP resolution.
>
>   Normal Debian repos don't have a case like that, but the Packages file
>   should work even if packages are not stored in the pool in the most
>   usual way.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1086997/+subscriptions
>

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1086997

Title:
  apt-get fails if a package has a space in its Filename

Status in “apt” package in Ubuntu:
  New

Bug description:
  If a package has a space in its Filename: entry in the Packages file,
  you get errors on HTTP resolution.

  Normal Debian repos don't have a case like that, but the Packages file
  should work even if packages are not stored in the pool in the most
  usual way.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1086997/+subscriptions




More information about the foundations-bugs mailing list