image upload, extension are hard coded in the script

More
10 years 10 months ago #43218 by anonyme
Good morning,

In code.google.com/p/flexicontent/ ... 668&r=1668

line : 141, extensions are hardcoded :
$imageexts = array('jpg','gif','png','bmp');

and used later, line:149
by
if ( !in_array($row->ext, $imageexts)) continue; // verify image is in allowed extensions

Partially fixed by using the following code ( Will use the flexicontent configuration option>Legal Image Extensions (File Types) :bmp,gif,jpg,png,jpeg ):

if ( !in_array(strtolower($ext), explode(',',$this->params->get('image_extensions'))))
{

Bug found when trying to upload a *.jpeg.

Adding strtolower() will also fix later bugs given that the extension list in the configuration should be in lowercase.

Full fix of this bug will involve to get the extension directly from the considered image field.

Regards

Website : in construction

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #43248 by ggppdk
Hello

yes, about strtolower, will add this

but the reason that image extensions are hardcoded is because these are supported by phpThumb


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.291 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline