View Issue Details

IDProjectCategoryView StatusLast Update
5070Composr alpha bug reportsGeneral / Uncategorisedpublic2022-11-21 21:27
ReporterPDStig Assigned ToChris Graham  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Summary5070: Potential for t_mime_type to be NULL when editing a gallery item
DescriptionWhen editing a gallery item, it is possible for t_mime_type to be NULL, causing type errors.

I think something is wrong when uploads.php calls get_webpage_meta_details.

In that function, we have $result = cache_and_carry('cms_http_request', [$url, ['byte_limit' => 1024 * 10, 'trigger_error' => false, 'timeout' => 2.0]]);.

cms_http_request might set the returned mime type to NULL, causing $result[1] to be NULL, and therefore t_mime_type to be NULL. I confirmed this both in the cache and in the output of the function.

This happened when editing the default homepage hero slider images, but keeping the original image (e.g. editing the description).
TagsNo tags attached.
Attach Tags
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2022-11-21 21:27

administrator   ~7686

Fixed cases of mime-type being null but passed through to processing on it.

Ultimately Apache does not have a default mime-type for a webp, which is why Composr did not get one to check.

Issue History

Date Modified Username Field Change
2022-11-21 19:39 PDStig New Issue
2022-11-21 19:39 PDStig Status Not Assigned => Assigned
2022-11-21 19:39 PDStig Assigned To => Chris Graham
2022-11-21 19:40 PDStig Description Updated
2022-11-21 21:27 Chris Graham Status Assigned => Resolved
2022-11-21 21:27 Chris Graham Resolution open => fixed
2022-11-21 21:27 Chris Graham Note Added: 0007686
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised