{"id":7,"date":"2007-05-21T12:43:50","date_gmt":"2007-05-21T17:43:50","guid":{"rendered":"http:\/\/www.popmartian.com\/tipsntricks\/2007\/05\/21\/php-header-injection\/"},"modified":"2007-05-21T13:04:49","modified_gmt":"2007-05-21T18:04:49","slug":"php-header-injection","status":"publish","type":"post","link":"https:\/\/www.popmartian.com\/tipsntricks\/2007\/05\/21\/php-header-injection\/","title":{"rendered":"PHP Header injection"},"content":{"rendered":"<p>I regularly shut down web sites that use the PHP mail() function.  While the users of the sites mean well, they generally don&#8217;t do any checking before sending data to mail().  I&#8217;m not going to weigh in mail().  Enough has been said about it.  Just remember to take your code and code security seriously.<\/p>\n<p>Remember, never trust data submitted by site visitors.  Sanitize the heck out of it.<\/p>\n<p>Jelly and Custard has an excellent explanation of PHP Header Injection when using the PHP mail() function.<\/p>\n<p><a href=\"http:\/\/www.jellyandcustard.com\/2006\/02\/24\/email-header-injection-in-php\/\" target=\"_blank\">http:\/\/www.jellyandcustard.com\/2006\/02\/24\/email-header-injection-in-php\/<\/a><\/p>\n<p><a href=\"http:\/\/www.jellyandcustard.com\" target=\"_blank\">http:\/\/www.jellyandcustard.com<\/a> is an excellent PHP blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I regularly shut down web sites that use the PHP mail() function. While the users of the sites mean well, they generally don&#8217;t do any checking before sending data to mail(). I&#8217;m not going to weigh in mail(). Enough has &hellip; <a href=\"https:\/\/www.popmartian.com\/tipsntricks\/2007\/05\/21\/php-header-injection\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,11,9],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-how-to-do-stuff","category-posted-by-email","category-php","category-programming"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":0,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}