From 6071791d22ca7136e5069653cfb0d14093964e2c Mon Sep 17 00:00:00 2001 From: Sid Stamm Date: Wed, 25 Aug 2010 08:36:44 -0700 Subject: [PATCH] Bug 581980 - allow trailing semi-colon in CSP, r=bsterne, a=jst --- content/base/src/CSPUtils.jsm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/base/src/CSPUtils.jsm b/content/base/src/CSPUtils.jsm index a16e9ca1b931..40d6b84d3afd 100644 --- a/content/base/src/CSPUtils.jsm +++ b/content/base/src/CSPUtils.jsm @@ -185,6 +185,8 @@ CSPRep.fromString = function(aStr, self) { directive: for each(var dir in dirs) { dir = dir.trim(); + if (dir.length < 1) continue; + var dirname = dir.split(/\s+/)[0]; var dirvalue = dir.substring(dirname.length).trim();