Closed Bug 1045545 Opened 12 years ago Closed 12 years ago

Remove dependency on amo-validator

Categories

(Marketplace Graveyard :: Code Quality, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2014-08-19

People

(Reporter: mat, Assigned: mat)

Details

(Whiteboard: [repoman][qa-])

Surprise, zamboni still depends on amo-validator! The only place where it's used is in mkt/files/helpers.py, where we import blacklisted_extensions and blacklisted_magic_numbers for the... File Viewer. We should figure out if we still need all that, remove all code that we can and the dependency on amo-validator.
Priority: -- → P3
what are blacklisted_magic_numbers?
We still use the File Viewer code (that's what the reviewer tools use). `blacklisted_extensions` and `blacklisted_magic_numbers` are used to prevent viewing some specific files: blacklisted_extensions = ("dll", "exe", "dylib", "so", "sh", "class", "swf") blacklisted_magic_numbers = ( (0x4d, 0x5a), # EXE/DLL (0x5a, 0x4d), # Alternative for EXE/DLL (0x7f, 0x45, 0x4c, 0x46), # UNIX elf (0x23, 0x21), # Shebang (shell script) (0xca, 0xfe, 0xba, 0xbe), # Java + Mach-O (dylib) (0xca, 0xfe, 0xd0, 0x0d), # Java (packed) (0xfe, 0xed, 0xfa, 0xce), # Mach-O (0x46, 0x57, 0x53), # Uncompressed SWF (0x43, 0x57, 0x53), # ZLIB compressed SWF ) The easy solution would be to just copy those in zamboni.
Assignee: nobody → mpillard
the same functions exist in app-validator too, if changing the import to there is easier.
Good catch, that'll be even better.
Status: NEW → ASSIGNED
Target Milestone: --- → 2014-08-19
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [repoman] → [repoman][qa-]
You need to log in before you can comment on or make changes to this bug.