[img] tag - Allow all extensions

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Zapco03
Registered User
Posts: 18
Joined: Fri Feb 03, 2006 10:33 pm

[img] tag - Allow all extensions

Postby Zapco03 » Sat Nov 08, 2008 6:32 pm

Hello,

I am using gallery2 as my community gallery and the url's of images in this gallery are long and have no extension.

(eg. http://www.server.com/modules/gallery2/ ... emId=11111)

What can I do to allow images with this type of URL?

Also,

a user posted this image

Code: Select all

[img]http://content.leenks.com/pics/2008/random111/random-35.jpg[/img]


and it just shows up as the word

Image

What is wrong with this url?

User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Re: [img] tag - Allow all extensions

Postby AdamR » Sat Nov 08, 2008 7:39 pm

For security reasons, images whose extensions cannot be confirmed (such as in the first example) aren't allowed by BBCode. Instead of an image, it's fully possible for someone to embed a JavaScript script, or even worse, onto a page which could be a security risk to anyone visiting the page, or possibly even the server.

As for the second example, it looks like that website does not allow what's called "off-site linking." Basically, if someone tries to access that picture any other way besides typing the address in their address bar or viewing it from that site itself, the picture will be blocked. Unfortunately that's something that can only be controlled by the website owners.

- Adam
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton

Zapco03
Registered User
Posts: 18
Joined: Fri Feb 03, 2006 10:33 pm

Re: [img] tag - Allow all extensions

Postby Zapco03 » Sat Nov 08, 2008 10:53 pm

I only have about 100 members using the forum, all of which are known personally. I am not afraid of them hacking my site and I do not unregistered users post.

Where in phpbb3 is the code that blocks this script. I would like to modify the forum to meet my needs. I tried changing some parts of includes\message_parser.php but was unable to make it work.



Thank you for explaining the second picture. Is there a way for me to set an "Image can not be displayed image instead of just the word image.

Zapco03
Registered User
Posts: 18
Joined: Fri Feb 03, 2006 10:33 pm

Re: [img] tag - Allow all extensions

Postby Zapco03 » Sat Nov 08, 2008 10:57 pm

Even better, the word "Image" should be a link to the photo that could not be displayed. Clicking the link should show the picture.

User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Re: [img] tag - Allow all extensions

Postby AdamR » Sat Nov 08, 2008 11:00 pm

Zapco03 wrote:I only have about 100 members using the forum, all of which are known personally. I am not afraid of them hacking my site and I do not unregistered users post.

Where in phpbb3 is the code that blocks this script. I would like to modify the forum to meet my needs. I tried changing some parts of includes\message_parser.php but was unable to make it work.


Your best option would be to ask in the MOD requests forum. :)

Thank you for explaining the second picture. Is there a way for me to set an "Image can not be displayed image instead of just the word image.


That's up to each individual browser and how it displays non-working images, since it's the browser that makes the request for the image and not the phpBB website. For example, IE will display the red X whereas Firefox will display the text unless an "alt" attribute is specified.

- Adam
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton

twodayslate
Registered User
Posts: 210
Joined: Mon Jan 22, 2007 11:27 pm

Re: [img] tag - Allow all extensions

Postby twodayslate » Sun Nov 09, 2008 12:39 am

This should be on topic...
phpbb attachments do not have extensions... how do you view those if the image tag does not work?

Sorry if this is considered hijacking here..
twodayslate WPblog | PbGunTrader The Paintball Buy, Sell, Trade | DreamHost Quality Hosting

User avatar
Lumpy Burgertushie
Registered User
Posts: 55181
Joined: Mon May 02, 2005 3:11 am

Re: [img] tag - Allow all extensions

Postby Lumpy Burgertushie » Sun Nov 09, 2008 1:25 am

twodayslate wrote:This should be on topic...
phpbb attachments do not have extensions... how do you view those if the image tag does not work?

Sorry if this is considered hijacking here..

what do you mean phpbb attachments do not have extensions?

you do not use the img tag with attachments.

please explain what your problem/question is a little better so we can help.

maybe even with examples, etc.

details, details,


robert

twodayslate
Registered User
Posts: 210
Joined: Mon Jan 22, 2007 11:27 pm

Re: [img] tag - Allow all extensions

Postby twodayslate » Sun Nov 09, 2008 1:28 am

Lumpy Burgertushie wrote:
twodayslate wrote:This should be on topic...
phpbb attachments do not have extensions... how do you view those if the image tag does not work?
Sorry if this is considered hijacking here..
what do you mean phpbb attachments do not have extensions?
you do not use the img tag with attachments.
please explain what your problem/question is a little better so we can help.
maybe even with examples, etc.
Image located: http://pbguntrader.com/download/file.ph ... &mode=view Thread: http://pbguntrader.com/viewtopic.php?p=950#p950
Image
All the files are files.php?id=#&mode=view even though it was a .png
twodayslate WPblog | PbGunTrader The Paintball Buy, Sell, Trade | DreamHost Quality Hosting

User avatar
ric323
Former Team Member
Posts: 22907
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [img] tag - Allow all extensions

Postby ric323 » Sun Nov 09, 2008 3:25 am

phpBB purposely obscures the filenames on your web server for security reasons. That is beside the point.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

twodayslate
Registered User
Posts: 210
Joined: Mon Jan 22, 2007 11:27 pm

Re: [img] tag - Allow all extensions

Postby twodayslate » Sun Nov 09, 2008 4:16 am

ric323 wrote:phpBB purposely obscures the filenames on your web server for security reasons. That is beside the point.
Any way to fix this?

Sorry if this is getting off topic...
twodayslate WPblog | PbGunTrader The Paintball Buy, Sell, Trade | DreamHost Quality Hosting

User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: [img] tag - Allow all extensions

Postby Phil » Sun Nov 09, 2008 5:50 am

There shouldn't be any reason to. Just copy the given URL and use it as needed.
Moving on, with the wind. | My Corner of the Web

twodayslate
Registered User
Posts: 210
Joined: Mon Jan 22, 2007 11:27 pm

Re: [img] tag - Allow all extensions

Postby twodayslate » Sun Nov 09, 2008 6:04 am

iWisdom wrote:There shouldn't be any reason to. Just copy the given URL and use it as needed.

but the [img] tag does not work... I can just make it an url but I would like an image to be able to be displayed as an image
twodayslate WPblog | PbGunTrader The Paintball Buy, Sell, Trade | DreamHost Quality Hosting

User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Re: [img] tag - Allow all extensions

Postby AdamR » Sun Nov 09, 2008 6:09 am

twodayslate wrote:
iWisdom wrote:There shouldn't be any reason to. Just copy the given URL and use it as needed.

but the [img] tag does not work... I can just make it an url but I would like an image to be able to be displayed as an image


If you want to allow any extension to be used in the [img] BBCode, this would require a MOD. If you need such functionality, you should ask in the MOD requests forum.

Just please note that BBCode was designed this way for a reason. There are extremely serious security issues opened up when removing that layer of protection ... on the level of someone gaining control of the entire server. ;)

- Adam
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton


Return to “3.0.x Support Forum”

Who is online

Users browsing this forum: cpapaioannou, Euservr, Google [Bot] and 76 guests