Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Broken '=' in [img] tag
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

msasha
Starting Member

6 Posts

Posted - 22 September 2004 :  09:44:27  Show Profile
Snitz changes any '=' characters to spaces and then encodes them into "%20" in img links. For example, the following link's url is http://www.foobar.com?foo=bar but if you right click the broken image you see that snitz changed it to http://www.foobar.com?foo%20bar



[moved from DEV Bug Reports (Open) forum]

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 22 September 2004 :  09:51:23  Show Profile  Visit HuwR's Homepage
this is a security measure not a bug
Go to Top of Page

msasha
Starting Member

6 Posts

Posted - 22 September 2004 :  10:33:45  Show Profile
Hmm, can you explain what security related purpose this serves?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 22 September 2004 :  11:45:24  Show Profile  Visit HuwR's Homepage
it prevents people writing javascript functions in the image tag
Go to Top of Page

msasha
Starting Member

6 Posts

Posted - 22 September 2004 :  13:41:22  Show Profile
Surely it's possible to filter javascript while allowing legitimate URLs... This problem precludes any dynamically generated images (chess diagrams on a chess forum in my case). At the very least you could convert the special characters (I notice that '&' and other special characters are converted too) to their HEX codes instead of converting everything to %20. That way I could parse the url on the server into what was intended.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 22 September 2004 :  13:59:07  Show Profile
you can just comment out the lines that convert the '=' sign to a space on your own forum if you want to. It's not a bug though. Moving to a more appropriate forum...
Go to Top of Page

msasha
Starting Member

6 Posts

Posted - 22 September 2004 :  14:08:19  Show Profile
That would solve my problem, but bring in the security problems. Additionally, it's not *my* forum so I can't make the change. Is the solution to convert special characters to their hex codes not appropriate?
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 22 September 2004 :  14:12:21  Show Profile
allowing any dynamically created image (an image created by a script) is a security risk. Any script that is supposed to create a dynamic image could be used for other purposes. It's a choice you have to make.
Go to Top of Page

msasha
Starting Member

6 Posts

Posted - 22 September 2004 :  14:21:13  Show Profile
I'm not sure I understand... How is allowing dynamically generated images any more a security risk than allowing statically generated ones? When you reference an image via a URL you don't know whether it's generated statically or dynamically anyway. Additionally, it's not that the conversion to %20 prevents dynamically generated images altogether - it just makes it harder for the person who writes the code that has to parse the url.

Again, is there any downside to my suggestion?
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 22 September 2004 :  14:31:06  Show Profile
we don't allow HEX codes in the image url either, again because of the security risk.
Go to Top of Page

msasha
Starting Member

6 Posts

Posted - 22 September 2004 :  15:16:29  Show Profile
http://www.foobar.com?foo%3Dbar seems to work fine in an img tag (3D is the hex value of '='):



Perhaps we are talking about different things?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07