Bug 2017143

Summary: [autoindex fancy]Directory named `core` gets icon for `core` file.
Product: [Fedora] Fedora Reporter: Pat Riehecky <riehecky>
Component: httpdAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 36CC: anon.amish, bnater, jkaluza, jorton, luhliari, mturk, pahan, pasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2017144 (view as bug list) Environment:
Last Closed: 2022-04-22 11:25:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1196553    

Description Pat Riehecky 2021-10-25 18:30:58 UTC
Description of problem:
When using the default configuration for `mod_autoindex` the default icon for a directory named `core` is bomb.gif.  Can the default config restrict bomb.gif to only files named `core` and let the `core` directory default to folder.gif?

Version-Release number of selected component (if applicable):
httpd-2.4.48-1.fc33

How reproducible:
100%

Steps to Reproduce:
1. Install httpd
2. Enable autoindex with Fancy Icons
3. mkdir /var/www/html/core
4. touch /var/www/html/core/examplefile
5. look at the auto generated index for /var/www/html/

Actual results:

The directory `core` gets `bomb.gif` for the icon, which is misleading.

Expected results:

Directories recieve `folder.gif` as their icon by default.

Additional info:

Comment 1 Ben Cotton 2022-02-08 21:36:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Luboš Uhliarik 2022-04-22 11:25:28 UTC
Hi Pat,

I changed the behavior how httpd treats core files. Previously, httpd was marking core files based on its filename. Because httpd can not distinguish between files and directories in AddIcon directive it was marking directories called "core" with the bomb icon as well.

Now mod_autoindex will check MIME type of the file and if the file is recognized as coredump, it will mark that file with the bomb icon.

Let me know if this works for you correctly and feel free to reopen this bug if not.

Comment 3 Joe Orton 2022-04-22 14:47:48 UTC
*** Bug 2077039 has been marked as a duplicate of this bug. ***