-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate format of downloaded content #155
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In certain cases, the .pdsc file that is downloaded has turned out to not be XML in the PDSC schema. CPM should validate that downloaded .pdsc files are indeed XML. It doesn't need to run a full verification against the schema; simply checking for
<?xml version="1.0" encoding="UTF-8"?>
and the opening<package>
element are sufficient.CPM should also verify that downloaded .pack files are indeed Zip archives. It can probably use a very simple test of the magic number (see the Wikipedia article). While not completely reliable, it should hopefully be sufficient for CPM's needs due to the pack format being constrained (not arbitrary zip files).
The text was updated successfully, but these errors were encountered: