[PATCH] hgweb: support Content Security Policy

Augie Fackler raf at durin42.com
Wed Jan 11 22:11:15 EST 2017


On Wed, Jan 11, 2017 at 10:05:05PM -0500, Augie Fackler wrote:
> On Tue, Jan 10, 2017 at 11:41:10PM -0800, Gregory Szorc wrote:
> > # HG changeset patch
> > # User Gregory Szorc <gregory.szorc at gmail.com>
> > # Date 1484120228 28800
> > #      Tue Jan 10 23:37:08 2017 -0800
> > # Node ID 113293954736e020d29e8e48aa3e01657ec853f3
> > # Parent  79314c9a79b3aa033b6f79d066b97d7157ecac33
> > hgweb: support Content Security Policy
>
> Queued this, thanks. Sometimes I wonder if http and html need to die
> when I see stuff like this.

I'm seeing some failures with this, maybe it failed to commute with
something else that landed in the interim. Can you take a look? I've
included failure output below (reproduced on both linux and OS X):

augie% make test-hgweb-csp.t
cd tests && python run-tests.py -j4 test-hgweb-csp.t

--- /Users/augie/Programming/hg/crew/tests/test-hgweb-csp.t
+++ /Users/augie/Programming/hg/crew/tests/test-hgweb-csp.t.err
@@ -68,6 +68,7 @@
   <!--[if IE]><script type="text/javascript" src="/repo1/static/excanvas.js"></script><![endif]-->
   <script type="text/javascript">
   <script type="text/javascript">
+  <script type="text/javascript">process_dates()</script>

 Configure CSP with nonce

@@ -105,6 +106,7 @@
   <!--[if IE]><script type="text/javascript" src="/repo1/static/excanvas.js"></script><![endif]-->
   <script type="text/javascript" nonce="*"> (glob)
   <script type="text/javascript" nonce="*"> (glob)
+  <script type="text/javascript">process_dates()</script>

 hgweb_mod w/o hgwebdir works as expected

@@ -127,3 +129,4 @@
   <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
   <script type="text/javascript" nonce="*"> (glob)
   <script type="text/javascript" nonce="*"> (glob)
+  <script type="text/javascript">process_dates()</script>

ERROR: test-hgweb-csp.t output changed

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list