Jul 8 2005

I was hap­pe­ning to enjoy wri­ting a lovely for­mat­ted email one eve­ning and I deci­ded I’d like to inc­lude a quote from a web­site at the end of the email. Gmail’s rich text edi­tor is fan­tas­tic at inter­pre­ting html from the clip­board and it imple­ments all for­mat­ting, URLs, ima­ges and code. I love this fea­ture and it is extre­mely handy. In this case I was cop­ying a block of text, howe­ver mid sen­tence there was a small image that was a use­ful link for the web­site but was not requi­red in the email. The text-editor added it as expec­ted and I motio­ned to remove it. Howe­ver, it wasn’t just your stan­dard image lin­ked to web page because upon clic­king to delete the icon it pro­cee­ded to load the page it lin­ked to… within the rich text edi­tor. The code for the image loo­ked something like this:

<a href=” url
onc­lick=”{ window.location.href=‘url that loads’; return false; }”
onmouseover=“status=‘url’; return true;”
onmouseout=“status=”; return true;”>
<img style=“width: 402px; height: 378px;” src=“image url” border=“0”>
</a>

This page that loa­ded repla­ced my care­fully wor­ded email much to my anno­yance yet I grew exci­ted at the pros­pect of being able to send web pages to friends with ease. My mind was tra­ve­ling along the lines of,

“If I could exploit this bug, I could create a sim­ple PHP script, ren­der some code for the desi­red URL and then get the full web page up in the edi­tor which I can then send”

Although these plans were somewhat thwar­ted when I noti­ced the SEND and save draft but­tons had become com­ple­tely defunct after ren­de­ring the url’s html. I’ve given up re-writing the ori­gi­nal email because I’m tired.I should also point out that this bug only occurs in fire­fox. Make of this what you will. Although I do fear it could open up some secu­rity issues such that the loa­ding of mali­cious html within gmail could pose a serious threat.

  • Discussion
  • Comments Off

Comments are closed.