Exemple #1
0
        public RuleCollectionView(CSPRuleCollector collector)
        {
            this.collector = collector;
            collector.OnRuleAddedOrModified += AddToListViewOnUIThread;

            InitializeComponent();
        }
        public RuleCollectionView(CSPRuleCollector collector)
        {
            this.collector = collector;
            collector.OnRuleAddedOrModified += AddToListViewOnUIThread;

            InitializeComponent();
        }
Exemple #3
0
        private void ValidateCSPReportSet(
            string documentUri,
            string expectedCsp,
            string[] cspReportsUnsafeInline,
            string[] cspReportsUnsafeEval)
        {
            CSPRuleCollector collector = new CSPRuleCollector(logger);

            foreach (var cspReport in cspReportsUnsafeInline.Select(cspReportAsString => CSPReport.Parse(cspReportAsString)))
            {
                collector.Add(cspReport, CSPRuleCollector.InterpretBlank.UnsafeInline);
            }
            foreach (var cspReport in cspReportsUnsafeEval.Select(cspReportAsString => CSPReport.Parse(cspReportAsString)))
            {
                collector.Add(cspReport, CSPRuleCollector.InterpretBlank.UnsafeEval);
            }

            Assert.AreEqual(collector.Get(documentUri), expectedCsp);
        }
        private void ValidateCSPReportSet(
            string documentUri,
            string expectedCsp,
            string[] cspReportsUnsafeInline,
            string[] cspReportsUnsafeEval)
        {
            CSPRuleCollector collector = new CSPRuleCollector(logger);

            foreach (var cspReport in cspReportsUnsafeInline.Select(cspReportAsString => CSPReport.Parse(cspReportAsString)))
            {
                collector.Add(cspReport, CSPRuleCollector.InterpretBlank.UnsafeInline);
            }
            foreach (var cspReport in cspReportsUnsafeEval.Select(cspReportAsString => CSPReport.Parse(cspReportAsString)))
            {
                collector.Add(cspReport, CSPRuleCollector.InterpretBlank.UnsafeEval);
            }

            Assert.AreEqual(collector.Get(documentUri), expectedCsp);
        }
 public FiddlerExtension()
 {
     logger = new FiddlerAppLogger();
     collector = new CSPRuleCollector(logger);
 }
 public FiddlerExtension()
 {
     logger    = new FiddlerAppLogger();
     collector = new CSPRuleCollector(logger);
 }