{"id":290,"date":"2008-04-22T01:55:46","date_gmt":"2008-04-21T23:55:46","guid":{"rendered":"http:\/\/www.nivas.hr\/blog\/?p=290"},"modified":"2008-04-22T01:57:04","modified_gmt":"2008-04-21T23:57:04","slug":"what-happens-if-you-output-unescaped-user-input","status":"publish","type":"post","link":"https:\/\/www.nivas.hr\/blog\/2008\/04\/22\/what-happens-if-you-output-unescaped-user-input\/","title":{"rendered":"What happens if you output unescaped user input?"},"content":{"rendered":"<p>If you build a webapp targeted for small and friendly crowd &#8211; usually nothing. But when you build a website for American presidential candidate&#8230;  Uh well, it smells like XSS. This weekend, <a href=\"http:\/\/www.barackobama.com\/\">Barack Obama<\/a> website accepted a comment from a visitor but did not escape nor strip out angle-brackets and quotemarks. A YouTube clip from zennie62 <a href=\"http:\/\/youtube.com\/watch?v=NKjomr1Afq0\">demonstrates the attack<\/a>. The clip shows a user clicking on the blog section of the Barack Obama site, which caused the browser to redirect to <a href=\"http:\/\/www.hillaryclinton.com\/\">hillaryclinton.com<\/a>. Funny! :) I still love the design of barackobama.com though. <\/p>\n<p><a href='http:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2008\/04\/site-obama.jpg'><img loading=\"lazy\" src=\"http:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2008\/04\/site-obama.jpg\" alt=\"\" title=\"site-obama\" width=\"500\" height=\"320\" class=\"alignnone size-full wp-image-292\" srcset=\"https:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2008\/04\/site-obama.jpg 550w, https:\/\/www.nivas.hr\/blog\/wp-content\/uploads\/2008\/04\/site-obama-450x288.jpg 450w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you build a webapp targeted for small and friendly crowd &#8211; usually nothing. But when you build a website for American presidential candidate&#8230; Uh well, it smells like XSS. This weekend, Barack Obama website accepted a comment from a visitor but did not escape nor strip out angle-brackets and quotemarks. A YouTube clip from&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts\/290"}],"collection":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":0,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nivas.hr\/blog\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}