inspec/lib
Adam Leff 9580732814 Source reader should not hand back files with nil contents (#2003)
If a profile has a data files directory that looks like this:

```
files/platforms/one/data.json
files/platforms/two/data.json
files/platforms/three/data.json
```

... the source reader will return the directories in the list of files but with
nil contents. This causes an issue when Inspec::Profile tries to create a sha256
checksum of the profile contents only to try to cast nil to a string when
building the null-delimited profile contents string.

Files that are empty will have an empty string as its contents, so it's safe to
assume that file entries with nil contents are actually a directory and have no
affect on the profile's checksum. Therefore, this change will eliminate any file
entries in responses from the source readers where the contents are nil.

Signed-off-by: Adam Leff <adam@leff.co>
2017-07-11 21:33:55 +02:00
..
bundles Remove any "All Rights Reserved" references (#1969) 2017-06-28 04:14:19 -07:00
fetchers Don't send HTTP headers that have nil values (#1948) 2017-06-21 19:09:13 -05:00
inspec Release v1.31.1 (#1996) 2017-07-06 16:29:20 -04:00
matchers Remove any "All Rights Reserved" references (#1969) 2017-06-28 04:14:19 -07:00
resources Change host resource to use getent ahosts on Linux (#2002) 2017-07-11 21:32:52 +02:00
source_readers Source reader should not hand back files with nil contents (#2003) 2017-07-11 21:33:55 +02:00
utils oracle_session and mssql_session improvement (#1857) 2017-06-29 11:01:32 -04:00
inspec.rb Remove any "All Rights Reserved" references (#1969) 2017-06-28 04:14:19 -07:00