mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
Fixed apt resource incorrectly parsing deb files w/ quoted URIs.
Fixes #4559. Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
c28284a797
commit
09392943f5
2 changed files with 3 additions and 0 deletions
|
@ -87,12 +87,14 @@ module Inspec::Resources
|
|||
active = raw_line == line
|
||||
|
||||
# formats:
|
||||
# deb "http://archive.ubuntu.com/ubuntu/" wily main restricted ...
|
||||
# deb http://archive.ubuntu.com/ubuntu/ wily main restricted ...
|
||||
# deb [trusted=yes] http://archive.ubuntu.com/ubuntu/ wily main restricted ...
|
||||
|
||||
words = line.split
|
||||
words.delete 1 if words[1] && words[1].start_with?("[")
|
||||
type, url, distro, *components = words
|
||||
url = url.delete('"') if url
|
||||
|
||||
next if components.empty?
|
||||
next unless URI::HTTP === URI.parse(url)
|
||||
|
|
|
@ -4,4 +4,5 @@ deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu wily main
|
|||
# newer versions of the distribution.
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ wily main restricted
|
||||
deb "http://archive.ubuntu.com/ubuntu/" wily main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ wily main restricted
|
||||
|
|
Loading…
Reference in a new issue