View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000484 | file | General | public | 2023-10-18 02:12 | 2024-02-04 19:18 |
Reporter | aulonsal | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | Arch Linux | OS Version | rolling |
Product Version | 5.45 | ||||
Fixed in Version | HEAD | ||||
Summary | 0000484: Misclassifies lua source file as 'JavaScript source, ASCII text' | ||||
Description | Lua source files using `require()` get classified as 'JavaScript source, ASCII text' in version 5.45, whereas earlier versions (tested 5.44) used to classify them as 'ASCII text'. This is probably due to what is [commit a2756aa50fdf7d87ebb14002ffd7609373ea6839](https://github.com/file/file/commit/a2756aa50fdf7d87ebb14002ffd7609373ea6839) on the Github readonly mirror. | ||||
Steps To Reproduce | Create the following lua source files: test.lua: ```lua require('other') ``` other.lua: ```lua ``` (blank file) ```shell > file --version file-5.45 magic file from /usr/share/file/misc/magic seccomp support included > file test.lua test.lua: JavaScript source, ASCII text ``` ```shell > LD_PRELOAD=../lib/libmagic.so ./file -m ../share/file/misc/magic.mgc --version file-5.44 magic file from ../share/file/misc/magic.mgc seccomp support included > LD_PRELOAD=../lib/libmagic.so ./file -m ../share/file/misc/magic.mgc ../../../../../../sample/test.lua ../../../../../../sample/test.lua: ASCII text ``` The above magic file is the one included with version 5.44 ``` > file -m ../../../5.44-3/usr/share/file/misc/magic.mgc --version file-5.45 magic file from ../../../5.44-3/usr/share/file/misc/magic.mgc seccomp support included > file -m ../../../5.44-3/usr/share/file/misc/magic.mgc ../../../../../../sample/test.lua ../../../../../../sample/test.lua: ASCII text ``` Version 5.45 works as before with the magic from version 5.44 (this is probably obvious, but I didn't know how file(1) worked at the start of this). Version 5.44 misclassifies when used with the magic from version 5.45. | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2023-10-18 02:12 | aulonsal | New Issue | |
2024-02-04 19:18 | christos | Assigned To | => christos |
2024-02-04 19:18 | christos | Status | new => assigned |
2024-02-04 19:18 | christos | Status | assigned => resolved |
2024-02-04 19:18 | christos | Resolution | open => fixed |
2024-02-04 19:18 | christos | Fixed in Version | => HEAD |
2024-02-04 19:18 | christos | Note Added: 0003995 |