View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000457 | file | General | public | 2023-06-12 11:53 | 2023-07-30 16:32 |
Reporter | ulm | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 5.44 | ||||
Fixed in Version | HEAD | ||||
Summary | 0000457: application/vnd.hp-HPGL false positives | ||||
Description | Forwarding Gentoo Linux bug https://bugs.gentoo.org/908401: sys-apps/file added detection for "Hewlett-Packard Graphics Language" in <https://github.com/file/file/commit/57df9984ca59a54a0ad2ac548bc155dabe07f03a>. This causes files in /etc/env.d that start with "PA" like "PATH" or "NP" as in "NPM_CONFIG_GLOBALCONFIG" to be detected as "Hewlett-Packard Graphics Language" files and not as "ASCII text". Configuration files or shell scripts starting with assignment of PATH or any other all-caps variable are very common, therefore the HPGL magic should do some additional plausibility checks in order to avoid false positives. | ||||
Steps To Reproduce | $ cat 95eselect-wine PATH="/etc/eselect/wine/bin" MANPATH="/etc/eselect/wine/share/man" XDG_DATA_DIRS="/etc/eselect/wine/share" $ file -i 95eselect-wine 95eselect-wine: application/vnd.hp-HPGL; charset=us-ascii $ file 95eselect-wine 95eselect-wine: Hewlett-Packard Graphics Language, starting with "PATH="/etc/eselect/wine/bin"" with "MANPATH="/" | ||||
Tags | No tags attached. | ||||
|
95eselect-wine (107 bytes)
PATH="/etc/eselect/wine/bin" MANPATH="/etc/eselect/wine/share/man" XDG_DATA_DIRS="/etc/eselect/wine/share" |
|
Applied patch from Joerg Jenderek. Does it help? |
|
The patch doesn't fix the problem. The test file that I had attached is recognised as text/plain now: $ file -i 95eselect-wine 95eselect-wine: text/plain; charset=us-ascii $ file 95eselect-wine 95eselect-wine: ASCII text However, it still fails with another example in the /etc/env.d/ directory of a Gentoo Linux system: $ cat 50npm NPM_CONFIG_GLOBALCONFIG=/etc/npm/npmrc $ file -i 50npm 50npm: application/vnd.hp-HPGL; charset=us-ascii $ file 50npm 50npm: Hewlett-Packard Graphics Language, starting with "NPM_CONFIG_GLOBALCONFIG=/etc/npm/npmrc" |
|
I can still reproduce that issue with the new file contents: ``` NPM_CONFIG_GLOBALCONFIG=/etc/npm/npmrc ``` with file-5.45. |
|
Fixed, thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-06-12 11:53 | ulm | New Issue | |
2023-06-12 11:53 | ulm | File Added: 95eselect-wine | |
2023-06-16 19:35 | christos | Assigned To | => christos |
2023-06-16 19:35 | christos | Status | new => assigned |
2023-06-16 19:36 | christos | Status | assigned => feedback |
2023-06-16 19:36 | christos | Note Added: 0003947 | |
2023-06-16 20:15 | ulm | Note Added: 0003953 | |
2023-06-16 20:15 | ulm | File Added: 50npm | |
2023-06-16 20:15 | ulm | Status | feedback => assigned |
2023-07-28 11:04 | thesamesam | Note Added: 0003968 | |
2023-07-30 16:32 | christos | Status | assigned => resolved |
2023-07-30 16:32 | christos | Resolution | open => fixed |
2023-07-30 16:32 | christos | Fixed in Version | => HEAD |
2023-07-30 16:32 | christos | Note Added: 0003969 |