DEBUG - Why Some Images Are Not Shown In Posts? »  Show posts from    to     

Icy Phoenix


Documentation And How To - DEBUG - Why Some Images Are Not Shown In Posts?



Zuker [ Thu 05 Apr, 2007 15:51 ]
Post 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


Mighty Gorgon [ Sun 08 Apr, 2007 11:16 ]
Post 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 .


toledo [ Wed 23 May, 2007 13:44 ]
Post subject: Re: Why Some Images Are Not Shown In Posts?
yeah for some reason users cannot upload BMP images!! why is this?


Mighty Gorgon [ Fri 25 May, 2007 01:40 ]
Post 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...


toledo [ Fri 25 May, 2007 14:09 ]
Post 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...


anyway to allow them?


Mighty Gorgon [ Sat 26 May, 2007 02:14 ]
Post 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...


anyway to allow them?

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


toledo [ Sat 26 May, 2007 18:50 ]
Post 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...


anyway to allow them?

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


Great now i can allow any image type!!


isb1009 [ Mon 04 Jun, 2007 13:44 ]
Post 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,


Mighty Gorgon [ Tue 05 Jun, 2007 00:56 ]
Post 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...


isb1009 [ Tue 05 Jun, 2007 15:02 ]
Post 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,


Mighty Gorgon [ Sun 10 Jun, 2007 04:36 ]
Post 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.




Powered by Icy Phoenix