[File] regression: javascript executables
Vincent Mihalkovic
vmihalko at redhat.com
Wed Dec 8 14:30:59 UTC 2021
Great, thanks!
On Wed, Dec 8, 2021 at 2:51 PM Christos Zoulas <christos at zoulas.com> wrote:
> Fixed; the issue was that the javascript magic used "search" instead of
> "string" and that ranked it lower than the #! magic in commands.
>
> Best,
>
> christos
>
> On Dec 8, 2021, at 6:38 AM, Vincent Mihalkovic <vmihalko at redhat.com>
> wrote:
>
> 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
>
> --
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20211208/02e72275/attachment.htm>
More information about the File
mailing list