<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 22:13:54 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DashExamples.com: Capture Content Security Policy (CSP) Violations in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16749</guid>
      <link>http://www.phpdeveloper.org/news/16749</link>
      <description><![CDATA[<p>
From DashExamples.com there's a quick post on how you can set up your application to <a href="http://linux.dashexamples.com/2011/08/capture-content-security-policy-csp-violations-in-php/">notify you on content security policy violations</a> and store them back on he server side for later review.
</p>
<blockquote>
When somebody violates your CSP rules, there is a great feature that can setup for supporting browsers to send back the violations to your server to be saved, processed or whatever. This is a great feature because you can stop a possibly malicious piece of code from executing and learn which scripts may have vulnerabilities in your code.
</blockquote>
<p>
The reports as delivered by the browser back to your server according to your site's policy setup. They're sent back as a JSON string that is easily parsed and stored. The post shows you a sample database table structure (storing things like request, headers, blocked location and IP address) and the PHP to handle the incoming post. For more about the CSP reports, see <a href="https://developer.mozilla.org/en/Security/CSP/Using_CSP_violation_reports">Mozilla's example</a> on their Developer section.
</p>]]></description>
      <pubDate>Mon, 22 Aug 2011 09:02:05 -0500</pubDate>
    </item>
  </channel>
</rss>
