Unicode spaces in sources.list files are not interpreted as spaces

Bug #1632392 reported by Chris Mazuc on 2016-10-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Low
Unassigned

Bug Description

I was troubleshooting an issue where apt was unable to update after copying the sources.list from another machine. It turns out the user was copy/pasting from an IM client that converted some whitespace to unicode non-breaking spaces.

To reproduce:

echo deb $'\302'$'\240'http://site.example.com/debian distribution component | sudo tee /etc/apt/sources.list.d/bugged.list

12.04 and 14.04 results in immediate failure to update:

$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/ http could not be found.

APT in 16.04 seems to handle this a bit more sanely:

$ sudo apt-get update
Hit:1 [removed]
Reading package lists... Done
E: The method driver /usr/lib/apt/methods/ http could not be found.
E: Failed to fetch  http://site.example.com/debian/dists/distribution/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

tags: added: precise trusty
Changed in apt (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers