On my site, I want to allow users to add reference to images which are hosted anywhere on the internet. These images can then be seen by all users of my site. As far as I understand, this could open the risk of cross site scripting, as in the following scenario: User A adds a link to a gif which he hosts on his own webserver. This webserver is configured in such a way, that it returns javascript instead of the image. User B opens the page containg the image. Instead of seeing the image, javascript is executed.
My current security messures are currently such, that both on save and open, all content is encoded. I am using asp.net(c#) on the server and a lot of jquery on the client to build ui elements, including the generation of image tags.
这种对地雷的恐惧是否正确? 我在这里没有其他重要的安全漏洞? 最重要的是,我如何防止这次袭击? 我现在能想到的唯一安全方式是,在服务器上 image光图像,如果它包含除双元数据以外的任何东西,则进行检查。