Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/cosmos/packets/parsers/xtce_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def parse(filename, target_name)
# Fortify complains about Path Manipulation here
# We have previously validated the file is a .xtce file in packet_config
# The file is opened read-only and then immediately parsed by Nokogiri
doc = File.open(filename) { |f| Nokogiri::XML(f, nil, nil, Nokogiri::XML::ParseOptions::STRICT | Nokogiri::XML::ParseOptions::NOBLANKS) }
doc = File.open(filename) { |f| Nokogiri::XML(f, nil, nil, Nokogiri::XML::ParseOptions::STRICT | Nokogiri::XML::ParseOptions::NOBLANKS | Nokogiri::XML::ParseOptions::HUGE) }
# Determine the @current_target_name
xtce_process_element(doc.root)
@current_target_name = target_name if target_name
Expand Down Expand Up @@ -612,6 +612,8 @@ def set_min_max_default(item, type, data_type)
# Strip quotes from strings
if type.initialValue[0] == '"' && type.initialValue[-1] == '"'
item.default = type.initialValue[1..-2]
else
item.default = type.initialValue
end
end
else
Expand Down