Joined: Mar 02, 2006 Posts: 362 Location: Vegas, America's cloaca
Posted: Fri Apr 14, 2006 5:47 am Post subject: [web][/web] bbcode -- iFrame mod
I suggest this bbcode be removed from the site. If some webpages are embedded using this iframe bbcode, the thread cannot be accessed without automatically forwarding to the frame-breaking embedded page.
To remove this retroactively and yet not break a lot of existing threads, write a little SQL that scans for the strings [web] and [/web] and replace them with the [url][/url] tags.
Caution: use phpmyadmin to first check that the bbcode is stored in simple format, i.e. [web]http://blah.com[/web] and not [web:3w4refw]http://blah.com[/web:sfergte4t]. If stored in the latter format, you will need additional SQL to remove the extra digits as well. I think. It may also work to simply do the replacement of "[web" with "[url" and "[/web" with "[/url" leaving the extra digits intact. Experiment by directly editing one post through phpmyadmin to see if this works.
Joined: Oct 04, 2004 Posts: 5434 Location: Oklahoma
Posted: Fri Apr 14, 2006 1:53 pm Post subject: Re: [web][/web] bbcode -- iFrame mod
I agree with the suggestion for the reason stated.
Also, while I think the embedded pages are kind of cool, I would strongly prefer to choose whether to look at a link rather than have it embedded in a thread here. Just my own preference, submitted for your consideration. _________________ "Every junkie's like a setting sun..." - Neil Young
Joined: Aug 13, 2004 Posts: 1185 Location: Richmond, VA, Pale Blue Dot
Posted: Fri Apr 14, 2006 6:59 pm Post subject: Re: [web][/web] bbcode -- iFrame mod
How about this
...if you want to post a webpage, and you aren't sure if it redirects the browser or not, do a preview, and check.
If it redirects, use url tags. If not, you are ok...
No sense in removing a cool feature, imo...
To fix one that already redirects (like I did), all a moderator (or the person who posted it) has to do is hit the stop button before it redirects, click edit on the post, change the web tags to url tags, and submit.
...a 2-second fix for a problem that occurs once in a while.
Problem solved? _________________ "If you are a real seeker after truth, it's necessary that at least once in your life you doubt all things as far as possible"-Rene Descartes
"When you have excluded the impossible, whatever remains however improbable must be the truth"-Sherlock Holmes
Joined: Aug 13, 2004 Posts: 1185 Location: Richmond, VA, Pale Blue Dot
Posted: Fri Apr 14, 2006 7:47 pm Post subject: Re: [web][/web] bbcode -- iFrame mod
why do people stop at stop lights? because if they don't they will most likely die or get badly injured. not to mention the insurance premium hike...
same basic logic applies here...
why would people preview and/or not post a redirecting page?
for at least three reasons:
1. you would not be able to get back to the page to see if anyone responded.
2. no one would be able to read your post.
3. after previewing an iframe that redirects, it is impossible to post.
just my $0.02... _________________ "If you are a real seeker after truth, it's necessary that at least once in your life you doubt all things as far as possible"-Rene Descartes
"When you have excluded the impossible, whatever remains however improbable must be the truth"-Sherlock Holmes
Joined: Aug 13, 2004 Posts: 1185 Location: Richmond, VA, Pale Blue Dot
Posted: Fri Apr 14, 2006 11:07 pm Post subject: Re: [web][/web] bbcode -- iFrame mod
Timing is truely everything isn't it
...you've got to be quick...it's a page-eat-page world out there...
If you mean that it's redirecting when you preview, then if you are using firefox, just click back and replace web with url. Internet Explorer seems to remove the text in the field. doh! yet another reason to use firefox...
If you mean that it's still redirecting after you have posted the redirecting page, then you have already run the red light...and now you are in a body cast... _________________ "If you are a real seeker after truth, it's necessary that at least once in your life you doubt all things as far as possible"-Rene Descartes
"When you have excluded the impossible, whatever remains however improbable must be the truth"-Sherlock Holmes
Joined: Aug 13, 2004 Posts: 1185 Location: Richmond, VA, Pale Blue Dot
Posted: Sat Apr 15, 2006 12:25 am Post subject: Re: [web][/web] bbcode -- iFrame mod
Most people don't preview because they are usually just posting text/links rather than web pages. For the reasons above (which could be added to), anyone who wants to post a web page would preview first. The solution works if people try to solve the problem, rather than ignoring it.
Your sql script would work too, but then no one could post web pages. It would be like cutting down a tree to remove shade, instead of moving into the sun. If you move, you have a tree for shade if you want it later.
Of course there are better solutions than the one I'm proposing, like parsing the code of the page within the ifame to see if it causes this problem. If it does, replace with url. If not, leave web. But I'd have to research that to see if it's even possible. _________________ "If you are a real seeker after truth, it's necessary that at least once in your life you doubt all things as far as possible"-Rene Descartes
"When you have excluded the impossible, whatever remains however improbable must be the truth"-Sherlock Holmes
Last edited by turmoil on Sat Apr 15, 2006 8:45 am; edited 1 time in total
Joined: Mar 02, 2006 Posts: 362 Location: Vegas, America's cloaca
Posted: Sat Apr 15, 2006 12:39 am Post subject: Re: [web][/web] bbcode -- iFrame mod
Getting rid of the iframe feature is not a big loss. I don't think you should use overblown analogies to describe it. But if you could put in a parser to force frame-breaking web pages into the [url] form, that would be the best solution.
Joined: Aug 13, 2004 Posts: 1185 Location: Richmond, VA, Pale Blue Dot
Posted: Sat Apr 15, 2006 8:21 am Post subject: Re: [web][/web] bbcode -- iFrame mod
No one ever likes my analogies...but, at least you liked the parsing solution...
As far as the vulnerbility is concerned, there's at least two good reasons (yes, I'm listing again) why no one on peakoil.com has become a victim of it:
1. anyone smart enough to find peakoil.com and dumb enough to write malicious code and link to it in an iframe needs to find another hobby.
2. jail is no fun _________________ "If you are a real seeker after truth, it's necessary that at least once in your life you doubt all things as far as possible"-Rene Descartes
"When you have excluded the impossible, whatever remains however improbable must be the truth"-Sherlock Holmes
Last edited by turmoil on Sat Apr 15, 2006 1:59 pm; edited 1 time in total
Joined: Oct 04, 2004 Posts: 5434 Location: Oklahoma
Posted: Sat Apr 15, 2006 9:56 am Post subject: Re: [web][/web] bbcode -- iFrame mod
Hey, if you guys are going to discuss specific vulnerabilities, maybe you should do it by PM.... Just a humble suggestion. _________________ "Every junkie's like a setting sun..." - Neil Young
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum