[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.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Zapco03
Registered User
Posts: 18
Joined: Fri Feb 03, 2006 10:33 pm

[img] tag - Allow all extensions

Post by Zapco03 »

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

Post by AdamR »

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

Post by Zapco03 »

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

Post by Zapco03 »

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

Post by AdamR »

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

Post by twodayslate »

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: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [img] tag - Allow all extensions

Post by Lumpy Burgertushie »

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
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
twodayslate
Registered User
Posts: 210
Joined: Mon Jan 22, 2007 11:27 pm

Re: [img] tag - Allow all extensions

Post by twodayslate »

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: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [img] tag - Allow all extensions

Post by ric323 »

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

Post by twodayslate »

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

Post by Phil »

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

Post by twodayslate »

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

Post by AdamR »

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
Locked

Return to “[3.0.x] Support Forum”