DEBUG - Why Some Images Are Not Shown In Posts?


Subject: DEBUG - Why Some Images Are Not Shown In Posts?
Some images are blocked because of errors...

Errors may be related to:

  • Corrupted file
  • Wrong file format (named as PNG while not being a PNG for example)
  • Possible hacking attempt (so the script blocks the image and insert a No Thumb instead)
  • Unknown error

Subject: Re: Why Some Images Are Not Shown In Posts?
Not only...

It may depends on several reasons.

Before raising a bug for this, try to check that your server support GD Libraries, otherwise you should disable Thumbnails in posts and any images resizing function.

Thumbnails in posts are not correctly generated for images with spaces in their names or with special chars in it: I've decided to force the function to generate thumbnails only for images with regular names for security reasons.

Any invalid chars in the names will block the script. Use images with alphanum chars in the name instead.

If you want to show all images I can post the code to allow all images, but do it at your own risk and I won't help you in solve problems that may arise from this. You are deliberately opening security holes on your site :wink: .

Subject: Re: Why Some Images Are Not Shown In Posts?
yeah for some reason users cannot upload BMP images!! why is this?

Profile PM  
Subject: Re: Why Some Images Are Not Shown In Posts?
BMP are not allowed... they are obsolete, and I cannot see reasons to use them in the web... :roll:

Subject: Re: Why Some Images Are Not Shown In Posts?
Mighty Gorgon wrote: [View Post]
BMP are not allowed... they are obsolete, and I cannot see reasons to use them in the web... :roll:


anyway to allow them?

Profile PM  
Subject: Re: Why Some Images Are Not Shown In Posts?
toledo wrote: [View Post]
Mighty Gorgon wrote: [View Post]
BMP are not allowed... they are obsolete, and I cannot see reasons to use them in the web... :roll:


anyway to allow them?

Open UPLOAD.PHP and change this string:
Code: [Download] [Hide] [Select]
$filetypes = 'jpg,gif,png';

Subject: Re: Why Some Images Are Not Shown In Posts?
Mighty Gorgon wrote: [View Post]
toledo wrote: [View Post]
Mighty Gorgon wrote: [View Post]
BMP are not allowed... they are obsolete, and I cannot see reasons to use them in the web... :roll:


anyway to allow them?

Open UPLOAD.PHP and change this string:
Code: [Download] [Hide] [Select]
$filetypes = 'jpg,gif,png';


Great now i can allow any image type!!

Profile PM  
Subject: Re: Why Some Images Are Not Shown In Posts?
So...
Could you post the code to allow creating thumbnails from images that have got special characters?
Many of my images have got dashes (-) and many other symbols for naming reasons.
For example, http://astronomipedia.quae.net/test/foro/viewtopic.php?t=5
The first message in the post has got dashes in the name, but the second one is "normal".

I've got GD version 2, and thumbnails activated. The thumbnails folders are also CHMOD 777. And they work because the "normal" picture has got a thumbnail.

Could you write the code to allow the thumbnails of this images with special characters?

Thank you,

Subject: Re: Why Some Images Are Not Shown In Posts?
When I have some free time I'll try to do some tests... it's not good having some strange chars in files, because of special chars parsing in different charset... anyway I'll try to allow users to use this if they want... :roll:

Subject: Re: Why Some Images Are Not Shown In Posts?
Thanks, Luca.
But... What are the security holes of allowing special characters in filenames?

Thank you again,

Subject: Re: Why Some Images Are Not Shown In Posts?
isb1009 wrote: [View Post]
Thanks, Luca.
But... What are the security holes of allowing special characters in filenames?

Thank you again,

If you allow some strange chars, you may be exposed to SQL and PHP injections/inclusions... that's why I've removed this possibility.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.8865s (PHP: 2% SQL: 98%)
SQL queries: 16 - Debug Off - GZIP Enabled