Closed Bug 1312518 Opened 8 years ago Closed 8 years ago

XML header not detected correctly in periodic file update script

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: coop, Assigned: coop)

References

Details

Attachments

(1 file)

philor noticed this was broken. At some point the header of the AMO version started including encoding information, and our script fails on that.

Patch incoming.
I checked, and we have xmllint available on the linux spot instances, so we might as well use it to give us more confidence about the state of the downloaded XML artifacts. Broke the check out into its own function should we need to change it in the future.

It's a shell patch, so tagging Hal for review.
Assignee: nobody → coop
Status: NEW → ASSIGNED
Attachment #8804051 - Flags: review?(hwine)
Comment on attachment 8804051 [details] [diff] [review]
[tools] Use xmllint to vlid downloaded xml artifacts

Review of attachment 8804051 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm functionally. One minor suggestion, but okay to land without taking.

::: scripts/periodic_file_updates/periodic_file_updates.sh
@@ +388,5 @@
> +   if [ ! -e ${XMLLINT} ]; then
> +       echo "ERROR: xmllint not found in PATH"
> +       exit 60
> +   fi
> +   ${XMLLINT} --format ${xmlfile} 1>/dev/null

No functional issue, but you might consider replacing '--format' with '--nonet --noout' - the first to preclude any entity-expansion-attack, the 2nd to save cpu cycles.
Attachment #8804051 - Flags: review?(hwine) → review+
https://hg.mozilla.org/build/tools/rev/92c3837580e05636185f7b7e7f104f8f57cf60f4
Bug 1312518 - Use xmllint to validate downloaded xml artifacts - r=hwine
(In reply to Hal Wine [:hwine] (use NI) from comment #2) 
> No functional issue, but you might consider replacing '--format' with
> '--nonet --noout' - the first to preclude any entity-expansion-attack, the
> 2nd to save cpu cycles.

Landed with the above suggestion, thanks!
"warning: failed to load external entity "blocklist_hg.xml""
Component: Tools → General
See Also: → 1389611
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: