Commit Graph

696 Commits

Author SHA1 Message Date
Tom Ritter
59de60ae4b Bug 1407343 Silence multiple classes of warnings for the MinGW build, including not enabling format warnings unless -Wformat is set r=froydnj,glandium
MozReview-Commit-ID: ALmo1hbqVxC

--HG--
extra : rebase_source : a68475b90372cd5679c37474fb6705b2a5d48ddf
2017-11-16 12:36:33 -06:00
Christoph Kerschbaumer
c848c91be9 Bug 1415612: Allow all plain text types when navigating top-level data URIs. r=bz 2017-11-13 21:25:02 +01:00
Christoph Kerschbaumer
1ea20715d4 Bug 1407891: Test navigation for right-click view-image on data:image/svg. r=bz 2017-11-08 17:43:26 +01:00
Christoph Kerschbaumer
6584da597b Bug 1407891: Allow view-image to open a data: URI by setting a flag on the loadinfo. r=bz 2017-11-08 20:01:41 +01:00
Christoph Kerschbaumer
d5958a52e0 Bug 1403870: Test toplevel data URI navigation to application/json is allowed. r=smaug 2017-11-03 13:27:01 +01:00
Christoph Kerschbaumer
078474c979 Bug 1403870: Allow toplevel data URI navigation data:application/json. r=smaug 2017-11-03 13:26:28 +01:00
Christoph Kerschbaumer
3d0a1f002e Bug 1403814 - Block toplevel data: URI navigations only if openend in the browser. r=smaug 2017-11-03 13:23:11 +01:00
Christoph Kerschbaumer
60bd93b916 Bug 1403814 - Update tests for toplevel data URI blocking because we know block after we have received the response. r=smaug 2017-11-03 13:22:57 +01:00
Christoph Kerschbaumer
8f13729a0f Bug 1403814: Test navigation to data:text/csv. r=smaug 2017-10-11 22:47:12 +02:00
Christoph Kerschbaumer
5703b12317 Bug 1302667 - CSP: Update test_child-src_worker.html because child-src falls back to script-src. r=dveditz,mckinley 2017-10-30 18:46:34 +01:00
Christoph Kerschbaumer
67c85139df Bug 1302667 - CSP: Test 'frame-src'. r=dveditz,mckinley 2017-10-30 18:46:19 +01:00
Christoph Kerschbaumer
d1b704d00d Bug 1302667 - CSP: Test 'worker-src'. r=dveditz,mckinley 2017-10-30 18:46:05 +01:00
Christoph Kerschbaumer
5d54a394cc Bug 1302667 - CSP: Add Parser test for 'worker-src'. r=dveditz,mckinley 2017-10-30 18:45:50 +01:00
Christoph Kerschbaumer
2fd8493f7f Bug 1302667 - CSP: Implement 'worker-src'. r=baku,dveditz,mckinley 2017-10-30 18:45:36 +01:00
Chris H-C
75fc345254 bug 1406391 - Remove toolkit.telemetry.enabled manipulation from tests r=Dexter
Minor note:
reftests should've turned off uploadEnabled in the first place.
reftests should have unified telemetry on. It's the future.

MozReview-Commit-ID: 9spzuUAXwwP
2017-10-30 10:47:39 -04:00
Coroiu Cristina
44d1b50592 Backed out changeset 70ccfda99dbc::ca6ae38c0432 (bug 1302667) for frequently failing mochitest in security/test/csp/test_worker_src.html r=backout a=backout on a CLOSED TREE
Backed out changeset ca6ae38c0432 (bug 1302667)
Backed out changeset ff86e185e09d (bug 1302667)
Backed out changeset 8ec6b8bf8c6c (bug 1302667)
Backed out changeset 21c73f9d8fac (bug 1302667)
Backed out changeset e982481dbf2c (bug 1302667)
Backed out changeset 70ccfda99dbc (bug 1302667)
2017-10-30 14:19:29 +02:00
Christoph Kerschbaumer
f74ce8742c Bug 1302667 - CSP: Update test_child-src_worker.html because child-src falls back to script-src. r=dveditz,mckinley 2017-10-30 09:07:31 +01:00
Christoph Kerschbaumer
3a0a307bf0 Bug 1302667 - CSP: Test 'frame-src'. r=dveditz,mckinley 2017-10-30 09:07:12 +01:00
Christoph Kerschbaumer
5fc9f5eebd Bug 1302667 - CSP: Test 'worker-src'. r=dveditz,mckinley 2017-10-30 09:06:53 +01:00
Christoph Kerschbaumer
0de95dd051 Bug 1302667 - CSP: Add Parser test for 'worker-src'. r=dveditz,mckinley 2017-10-30 09:06:35 +01:00
Christoph Kerschbaumer
58b63c1576 Bug 1302667 - CSP: Implement 'worker-src'. r=baku,dveditz,mckinley 2017-10-30 09:10:36 +01:00
Phil Ringnalda
4bc2b1615d Backed out 4 changesets (bug 1408433, bug 1406391, bug 1408512) for crashing tests by touching the network contacting incoming.telemetry.mozilla.org on nightly builds
Backed out changeset 9bfd4b0927dc (bug 1408433)
Backed out changeset 555850d5107e (bug 1408512)
Backed out changeset 15d959b9123e (bug 1406391)
Backed out changeset e1f34ba9cecc (bug 1406391)

MozReview-Commit-ID: BVoGRsD73Hf
2017-10-27 21:08:27 -07:00
Chris H-C
8e6dd31d55 bug 1406391 - Remove toolkit.telemetry.enabled manipulation from tests r=Dexter
Minor note:
reftests should've turned off uploadEnabled in the first place.

MozReview-Commit-ID: 9spzuUAXwwP
2017-10-27 10:59:43 -04:00
Andrew McCreight
298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Andrew McCreight
1d0acbdb9b Bug 1412125, part 1 - Manually add mode lines and MPL to files that were missing them entirely. r=qdot
These were detected by the script used to generate part 2.

MozReview-Commit-ID: VMcT154f6f

--HG--
extra : rebase_source : 2f5fc8a314302fcacac840a8dbe0ff874d518e51
2017-10-26 14:54:59 -07:00
Christoph Kerschbaumer
ebfa77072c Bug 1408451: Log to web console when blocking toplevel data: URI navigations. r=bz 2017-10-16 14:18:52 +02:00
Brendan Dahl
42bc28d260 Bug 1399956 - Disable some mochitests in headless. r=jrmuizel
These tests will need more work and are low priority.

MozReview-Commit-ID: H0J16E8FqNr
2017-10-16 16:15:45 -07:00
Kris Maglione
98c0c61998 Bug 1407056: Follow-up: Don't try to truncate data URI strings to a longer length. r=me
MozReview-Commit-ID: CDsYXyrhB7T

--HG--
extra : rebase_source : 5647f2d05def805218a2ee45913da4388a4d9647
extra : amend_source : e5015c868db64dce924476600f713b6c3aac1e17
2017-10-12 16:56:37 -07:00
Kris Maglione
84fb189b82 Bug 1407056: Part 2 - Override page CSP for loads by expanded principals. r=bz,krizsa
Per the CSP specification, content injected by extensions is meant to be
exempt from page CSP. This patch takes care of the most common case of content
injected by extension content scripts, which always have expanded principals
which inherit from the page principal.

In a follow-up, we'll probably need to extend the exemption to stylesheet
content loaded by extension codebase principals.

MozReview-Commit-ID: GlY887QAb5V

--HG--
extra : rebase_source : 1371b4e4e7f330b7f7721d4aa169fcb52a7622d0
2017-10-07 14:53:30 -07:00
Kris Maglione
5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
Nicholas Nethercote
159f6b5627 Bug 1406794 - Provide the CSP keywords in both UTF8 and UTF16 forms. r=ckerschb
This avoids the need for numerous 8-to-16-bit and 16-to-8-bit string
conversions.

The patch also introduces a higher-order macro, FOR_EACH_CSP_KEYWORD, which
defines all the stuff about the keywords in a single place and makes the code
nicer.

--HG--
extra : rebase_source : b0f655546aa397749bb18dc7d6d27fbc12fe8fca
2017-10-06 16:16:52 +11:00
Jason Tarka
a8b72c7aa8 Bug 1380755 - Examine & report on frame-ancestors CSP in report-only mode. r=ckerschb
Despite what the comment here says, there is nowhere in the W3C CSP spec stating
that frame-ancestors should be ignored in report-only mode.
2017-07-17 14:19:57 -04:00
Ben Kelly
eec881a235 Bug 1391693 P3 Allow CSP report channels to be internally redirected. r=ckerschb 2017-10-09 10:03:40 -07:00
Nicolas B. Pierron
e51c33aaf4 Bug 1399379 - Use memcpy to import/export SRI hashes to the JS bytecode buffer. r=francois 2017-10-03 10:00:00 -04:00
Christoph Kerschbaumer
b0dac2b742 Bug 1403641: Test data: URI download. r=bz 2017-10-04 08:44:36 +02:00
Christoph Kerschbaumer
04a3ca2e32 Bug 1403641: Allow data: URI downloads even if data: URI navigations are blocked. r=bz 2017-10-04 08:43:56 +02:00
Christoph Kerschbaumer
a3d6a913cc Bug 1402363: Test Mixed Content Redirect Blocking. r=tanvi,kate 2017-10-02 09:12:12 +02:00
Christoph Kerschbaumer
8944f6c302 Bug 1402363: Explicitly cancel channel after mixed content redirect. r=honza,kate 2017-10-02 09:11:57 +02:00
Xidorn Quan
e69b3c7976 Bug 1403024 part 1 - Add nsContentUtils::SchemeIs helper function. r=bholley
MozReview-Commit-ID: 2NVc5QJSjl

--HG--
extra : rebase_source : 5d25c9c507eaa2a08d68c331a8ba9d304c97f305
2017-09-26 10:21:01 +10:00
Chris Peterson
5698729243 Bug 870698 - Part 10: Replace Append(NS_LITERAL_STRING("")) with AppendLiteral(u""). r=erahm
The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.

MozReview-Commit-ID: H9I6vNDMdIr

--HG--
extra : rebase_source : cf537a1f65af003c6c4f8919b925b0f305c1dd4d
extra : source : 13b89ce4e6a66c840f82a335c71f5a12938aba22
2017-09-07 18:32:54 -07:00
Chris Peterson
a6a56ed916 Bug 870698 - Part 6: Replace Append(NS_LITERAL_CSTRING("")) with AppendLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: F750v6NN81s

--HG--
extra : rebase_source : 714dd78df0f4c33e23e5b117615bd8fd561674c5
extra : source : 742bda9e6b1ddaf34d09894204ad18ce798b79b7
2017-09-07 18:25:25 -07:00
Chris Peterson
a0c8081df4 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK

--HG--
extra : rebase_source : 115842c37a40041bdca7b4e1ff0a5680b02ced15
extra : source : 90bfff9c01d80086cdc17637f310e898fea295ea
2017-09-06 01:13:45 -07:00
Christoph Kerschbaumer
ece368a815 Bug 1398692: Test toplevel navigation to a data:application/pdf. r=bz 2017-09-14 07:37:07 +02:00
Christoph Kerschbaumer
929390bec4 Bug 1398692: Allow toplevel navigation to a data:application/pdf. r=bz 2017-09-14 07:34:41 +02:00
Christoph Kerschbaumer
2cbe4b9466 Bug 1398691 - Unescape data: URI for console message when blocking toplevel data: URI navigations. r=smaug 2017-09-12 07:06:38 +02:00
Christoph Kerschbaumer
d43805d4f6 Bug 1396320: Fix CSP sandbox regression for allow-scripts. r=dveditz 2017-09-07 09:11:38 +02:00
Christoph Kerschbaumer
9db4e41781 Bug 1396798: Test toplevel data: URI navigation to images. r=smaug 2017-09-06 16:16:18 +02:00
Christoph Kerschbaumer
1e7caa84a1 Bug 1396798: Do not block toplevel data: navigation to image (except svgs). r=smaug 2017-09-06 16:27:05 +02:00
Christoph Kerschbaumer
11ddd453de Bug 1394554: Test block data: URI toplevel navigations after redirect. r=smaug 2017-09-06 09:34:59 +02:00
Christoph Kerschbaumer
8cc650c579 Bug 1394554: Test block data: URI toplevel navigations after redirect. r=smaug 2017-09-06 09:34:38 +02:00