Actions
Bug #29409
openscap_file content get whitespace stripped
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Description
When you upload a scap content (and probably any other DS), the data in the database gets whitespace stripped:
% diff -u tests/test_playbooks/data/ssg-firefox-ds.xml ~/Downloads/ssg-firefox-ds.xml --- tests/test_playbooks/data/ssg-firefox-ds.xml 2020-03-25 13:55:54.952567896 +0100 +++ /home/evgeni/Downloads/ssg-firefox-ds.xml 2020-03-25 15:05:39.476260242 +0100 @@ -4012,4 +4012,4 @@ </ns12:cpe-item> </ns12:cpe-list> </ns0:component> -</ns0:data-stream-collection> +</ns0:data-stream-collection> \ No newline at end of file
this is rather annoying when you want to check the computed digest against the local file sha256, as they will not match
quoting irc for why this happens:
< tbrisker> Zhenech: i think i may know what it is, let me find the line < tbrisker> Zhenech: https://github.com/theforeman/foreman/blob/develop/app/models/concerns/strip_whitespace.rb < tbrisker> Zhenech: the fix it to define `skip_strip_attrs` to an array containing the column you don't want modified
Updated by Evgeni Golov over 4 years ago
- Related to Tracker #27680: API bugs that need workarounds in foreman-ansible-modules added
Actions