Closed Bug 826408 Opened 11 years ago Closed 11 years ago

Drop checksums for empty files in Jetpack versions

Categories

(addons.mozilla.org Graveyard :: Add-on Validation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kmag, Unassigned)

References

Details

Currently there are checksums for empty files in the Jetpack checksums list, which causes empty files to usually generate a spurious Jetpack version mismatch warning for Jetpack add-ons which contain empty files (usually defaults/preferences/prefs.js). Not only is this confusing, but it also causes editors to occasionally reject add-ons without actually investigating the files.

The checksum responsible for the prefs.js warnings is 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b but it would be nice to exclude any other "empty" file, including a 0 bytes file, just "\n", "\r", or "\r\n":

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
9d1e0e2d9459d06523ad13e28a4093c2316baafe7aec5b25f30eba2e113599c4
01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
7eb70257593da06f682a3ddda54a9d260d4fc514f645237f5ca74b08f8da61a6
We could take the contents of the file, strip it so it pulls whitespace off the start/end and see if it is 0 length at that point. Then we don't have to add more checksums and just pass if it is 0
Yeah, that would be fine for new files, but we still have a catalog of old checksums that needs to be cleaned up.
https://github.com/mozilla/amo-validator/commit/ea654ff8a65459d319bb7591487f655af92a7bfe

Now preventing empty files from being processed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.