[File] regression: javascript executables
Vincent Mihalkovic
vmihalko at redhat.com
Wed Dec 8 11:38:14 UTC 2021
Hi,
this regression (https://bugzilla.redhat.com/show_bug.cgi?id=2029975) was
introduced with file-5.41
The problematic commit & line is
https://github.com/file/file/commit/c07b2a18eb1c5d3854e3ecc72319a2336e361d9e#diff-85466710385fb2ac02303e18020a937c563abbea6d4050ba3aff96cf6c8e6866R10
<https://github.com/file/file/commit/c07b2a18eb1c5d3854e3ecc72319a2336e361d9e#diff-85466710385fb2ac02303e18020a937c563abbea6d4050ba3aff96cf6c8e6866R100>
which
overwhelms the
https://github.com/file/file/blob/master/magic/Magdir/javascript patterns.
The powerful (with huge strength) "wild-card match for interpreters"
pattern is the cause of the regression. After running file --
checking-printout --list:
100: > 0 string/wt,=#! ,"a"] <-- used detection pattern
101: >> 1 string,x,"%s script text executable"]
...
16: > 0 search/1,=#!/usr/bin/env nodejs,"Node.js script text executable"]
<-- expected detection pattern
I want to ask how to fix this - whether to increase the strength of the
JavaScript detection patterns or to remove the "wild-card match for
interpreters" pattern...
regards,
vincent mihalkovic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20211208/2141674f/attachment.htm>
More information about the File
mailing list