Opened 5 years ago

Closed 5 years ago

#10912 closed enhancement (fixed)

Improve BMP sniffer rule

Reported by: humdinger Owned by: pulkomandy
Priority: normal Milestone: R1
Component: Servers/registrar Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This is hrev47314.

The current sniffing rule '0.50 ("BM")' recognizes text files starting with "BM" as image/bmp files. FWIW, changing the rule to '0.25 ("BM")' seems to fix this misidentifiction.
But maybe there's a more specific sniffer rule that works better. Wikipedia has infos on the bmp file header.

Change History (1)

comment:1 by pulkomandy, 5 years ago

Resolution: fixed
Status: newclosed

Improved the rule in hrev47387. It now checks for two bytes that are 0 in BMP files, which shouldn't happen in a noncorrupted text file.

Note: See TracTickets for help on using tickets.