Граф коммитов

720 Коммитов

Автор SHA1 Сообщение Дата
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
Christoph Kerschbaumer 9522e28631 Bug 1394554: Block toplevel data: URI navigations after redirect. r=smaug 2017-09-06 09:33:10 +02:00
Christoph Kerschbaumer 1b8c06e845 Bug 1331740: Pass correct context for TYPE_DOCUMENT loads within docshell. r=smaug 2017-09-05 18:01:07 +02:00
Henri Sivonen 3c8567b60d Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin
MozReview-Commit-ID: Llt29dvB4Io

--HG--
extra : rebase_source : 3ae51dc8beff3fb19e9318a6c7c30c9ab08a5b57
2017-08-29 16:01:42 +03:00
Chung-Sheng Fu 90189a558c Bug 863246 - Fix test failures r=Gijs
MozReview-Commit-ID: 8tUr27zvs8z

--HG--
extra : rebase_source : 997ace66c37098701d433508c682ed7621a78479
2017-07-19 17:30:01 +08:00
Sebastian Hengst a8f25b8f67 Backed out changeset a7b0c6ddd812 (bug 863246) 2017-08-25 16:43:33 +02:00
Chung-Sheng Fu 2c9f10e897 Bug 863246 - Fix test failures r=Gijs
MozReview-Commit-ID: 8tUr27zvs8z

--HG--
extra : rebase_source : f9ce0f19c1cceeefac0a015d33b94bb787a34ffb
2017-07-19 17:30:01 +08:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Christoph Kerschbaumer 2ae1ae3098 Bug 1387871 - CSP: Test 'self' within meta csp in data: URI iframe. r=dveditz 2017-08-23 09:50:20 +02:00
Christoph Kerschbaumer 79a239cba5 Bug 1387684 - CSP: Special case 'self' for unique opaque origins. r=dveditz 2017-08-23 10:05:12 +02:00
Christoph Kerschbaumer d6143e40d8 Bug 1391011: CSP: Test upgrade-insecure-requests for toplevel navigations when base it https. r=smaug 2017-08-21 08:58:01 +02:00
Wes Kocher 366445521c Merge m-c to autoland, a=merge
MozReview-Commit-ID: DjSlrmDFfe3
2017-08-16 17:14:41 -07:00
Kate McKinley 5c5de1568b Bug 1390687 - remove versioned javascript and legacy generator code r=emk
MozReview-Commit-ID: 5f3NQdjQ68v

--HG--
extra : rebase_source : 6216fa33d168fb39b885f7cd0e4f7622af8dc3df
2017-08-15 16:08:16 -07:00
Gabor Krizsanits 722233fed1 Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-16 13:00:22 +02:00
Carsten "Tomcat" Book eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Carsten "Tomcat" Book 1fc6e56a12 merge autoland to mozilla-central a=merge 2017-08-16 11:20:31 +02:00
Carsten "Tomcat" Book a478b0ef54 Backed out changeset adf5ed713e0d (bug 1376895) 2017-08-16 11:15:50 +02:00
Nicholas Nethercote a83fefd956 Bug 1390036 (part 1) - Remove most remaining uses of nsXPIDLString. r=erahm.
CompareCacheHashEntry::mCrit[] is the only case where the nsXPIDLString-ness
was important. The patch adds an explicit SetIsVoid() call to that class's
constructor and changes some null checks to IsVoid() checks.

--HG--
extra : rebase_source : e68befcde4dd098bac2a550bc666eaf3bf1298d7
2017-08-11 18:31:22 +10:00
Wes Kocher 3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Masatoshi Kimura 38894511bc Bug 1390106 - Stop using versioned scripts in dom. r=mrbkap
MozReview-Commit-ID: 89KvCoTAg3I

--HG--
extra : rebase_source : 24831fa454a1cc6fff70a9b1eb509d0f5aeb800a
2017-08-14 20:42:55 +09:00
Gabor Krizsanits a53261ca24 Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-15 14:05:17 +02:00
Cameron McCormack 7f90eb21ad Bug 1384741 - Part 4: Test that we don't send CSP violation reports for cached fonts we don't actually use. r=jfkthame
MozReview-Commit-ID: Hlu6Dp1Hc1D
2017-08-07 10:13:31 +08:00
Cameron McCormack d531dc4afb Bug 1384741 - Part 2: Allow file_report_chromescript.js to listen for more than one CSP violation report. r=bz
MozReview-Commit-ID: 8ym5OqSUTMW
2017-08-07 10:11:04 +08:00
Cameron McCormack fdf6f9c5ef Bug 1384741 - Part 1: Add facility to buffer up CSP violation reports. r=bz
MozReview-Commit-ID: G4JLTmP1wD7
2017-08-07 10:09:32 +08:00
Brian Grinstead 0262e6e6ac Bug 1388552 - Export the HUDService object directly instead of individual methods and properties;r=nchevobbe
MozReview-Commit-ID: 9AYCuqqv1U7

--HG--
extra : rebase_source : 83612fd2c4edfde5c86cfc11a70682cc74ebfa12
2017-08-11 09:07:04 -07:00
Masatoshi Kimura 32e5d77ba4 Bug 1387805 - Remove [deprecated] nsIScriptSecurityManager.getCodebasePrincipal(). r=bz
MozReview-Commit-ID: CY47PBaQ5oy

--HG--
extra : rebase_source : 6a82bae0d3caafadc772a08a1d392ab30c4ad914
2017-08-06 15:31:31 +09:00
Eric Rahm 01f545fea7 Bug 1386825 - Part 1: Remove MOZ_B2G from dom. r=bkelly
MozReview-Commit-ID: 1zzP2r01B7U
2017-08-08 14:41:05 -07:00
Christoph Kerschbaumer a1341ccf6d Bug 1387811 - Follow up for Test within Bug 1381761: CSP JSON is never null, hence it's better to check actual contents of JSON for testing. r=dveditz 2017-08-06 11:37:09 +02:00
Christoph Kerschbaumer 4c276ebc38 Bug 1382869: Test data document should ignore meta csp. r=bz 2017-08-08 15:38:22 +02:00
Dragana Damjanovic dd.mozilla@gmail.com 23c8b30d23 Bug 1381282 - Change nsScriptErrorBase::InitWithWindowID so that it does not call GetSensitiveInfoHiddenSpec as much as now. r=bz r=valentin 2017-08-07 15:56:30 +02:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Kate McKinley 092434c08c Bug 1376651 - Pass the nsIScriptElement instead of allocating a string every time r=ckerschb
Change the interface to GetAlowsInline to take an nsISupports* instead
of a string, and pass the nsIScriptElement directly. If we don't have an
element, then pass nullptr or the mock string created as an
nsISupportsString.

MozReview-Commit-ID: pgIMxtplsi

--HG--
extra : rebase_source : 4691643bb67ff6c78a74a4886a04c4816cff6219
2017-07-27 11:01:24 -07:00
Christoph Kerschbaumer 8b999864f0 Bug 1381761 - Test data: URIs inherit the CSP even if treated as unique, opaque origins. r=dveditz 2017-08-04 14:10:38 +02:00
Christoph Kerschbaumer 38a3b36992 Bug 1386183 - Test Meta CSP on data: URI iframe to be merged with CSP from including context. r=dveditz 2017-08-03 10:52:27 +02:00
Wes Kocher 20689fef47 Backed out 2 changesets (bug 1376895) for breaking browser_identity_UI.js with assertions in nsPermissionManager.cpp a=backout
Backed out changeset 620d01ac103a (bug 1376895)
Backed out changeset 3a06ab7fda1a (bug 1376895)

MozReview-Commit-ID: 2C8kUg77dz8
2017-08-14 13:13:45 -07:00
Gabor Krizsanits 7f2b53e79a Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-14 17:42:05 +02:00
Sebastian Hengst ddd4030358 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IrMqWiJhwan
2017-08-01 11:23:57 +02:00
Nicholas Nethercote 73558eac3d Bug 1384834 (part 2) - Remove remaining uses of nsAdoptingCString. r=erahm.
--HG--
extra : rebase_source : 70a385a0a06bc88e728d51459e7460a68f15f7fb
2017-07-28 11:21:47 +10:00
Nicholas Nethercote d18fdecf67 Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm.
--HG--
extra : rebase_source : c81ee11b9d08198a000979760a8e29a01e9498d0
2017-07-28 11:21:45 +10:00
Wes Kocher b11975d1ad Merge m-c to autoland, a=merge
MozReview-Commit-ID: L5cEw8jWPNI
2017-07-31 17:53:14 -07:00
Sebastian Hengst 915c63c332 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-31 11:28:37 +02:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Kyle Machulis ef8d138ba7 Bug 1279218 - Remove tests related to the applet tag; r=bz
MozReview-Commit-ID: FzzA5Qic4Uq

--HG--
extra : rebase_source : 64206ee3e5073bafd822b23040fe6e24dda3463f
2017-07-10 16:15:16 -07:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Bevis Tseng d935b29e72 Bug 1378930 - Part 1: Remove nsINamed::SetName(). r=billm
MozReview-Commit-ID: 7aM1yJRsfPH

--HG--
extra : rebase_source : f207a37be835ac4e6c431af56737cebacf5c566d
2017-07-21 11:50:43 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Christoph Kerschbaumer e4b4af3900 Bug 1331351: Disable mochitest on android. r=me 2017-07-25 13:33:50 +02:00
Christoph Kerschbaumer 2d37dad0be Bug 1331351: Test allow toplevel window data: URI navigations from system. r=smaug 2017-07-24 18:51:39 +02:00
Christoph Kerschbaumer e116c4627b Bug 1331351: Test block toplevel window data: URI navigations. r=smaug 2017-07-24 18:52:01 +02:00
Andrew McCreight bf7fff95f0 Bug 1379786, part 4 - Use GetIsSystemPrincipal() method instead of going through secman in CHECK_PRINCIPAL_AND_DATA. r=mrbkap
MozReview-Commit-ID: INBsjjxbXZz

--HG--
extra : rebase_source : fd6d491d01acc70be1bf51e25ec31bbcde81344a
2017-07-10 15:00:03 -07:00
Ryan VanderMeulen 112cadfae3 Merge m-c to autoland. a=merge 2017-07-14 09:52:56 -04:00
Kartikaya Gupta 1ad55fc00a Bug 1380683 - Fix test_frameNavigation.html to pass with webrender enabled. r=jhao
MozReview-Commit-ID: 7CiM1eAFNJU

--HG--
extra : rebase_source : 0900fcc0cee8d44957408929f5451093e1db0728
2017-07-13 11:17:16 -04:00
Honza Bambas 3e3a7ddb9b Bug 1367814 - Let nsContentSecurityManager check if a redirect may load against the target channel's final URI, r=bz
This allows protocol handlers that load data from a privileged URI (chrome/file/jar) to make the channel's principal
as well as the redirect to look like (to) an unprivileged URI or a URI allowed to load to function correctly.
2017-07-13 05:51:00 +02:00
Carsten "Tomcat" Book 6ea5505659 Backed out changeset 13a9e2bbb96a (bug 1256122) for landing with wrong bug number in commit message 2017-07-13 15:41:53 +02:00
Honza Bambas 1fead4cd75 Bug 1256122 - Let nsContentSecurityManager check if a redirect may load against the target channel's final URI, r=bz
This allows protocol handlers that load data from a privileged URI (chrome/file/jar) to make the channel's principal
as well as the redirect to look like (to) an unprivileged URI or a URI allowed to load to function correctly.
2017-07-13 05:51:00 +02:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Kate McKinley 84d5adef43 Bug 1331730 - Log CORS messages from the content process r=bz,mayhemer
In e10s, a channel created by parent does not have a reliable reference
to the inner window ID that initiated the request. Without that, the
channel must request that the content process log and blocked messages
to the web console. This patch creates a new ipdl interface to pass the
message from the parent to the child process. The nsCORSListenerProxy
also needs to keep a reference to the nsIHttpChannel that created it so
it can find its way back to the child. Additionally, the
HttpChannelParent needs to be propagated when creating a new channel for
CORS.

MozReview-Commit-ID: 8CUhlVCTWxt

--HG--
extra : rebase_source : 350f39ad6f7ada39e88dfcc69c4f2c470e2be0de
2017-02-15 12:40:41 +09:00
Geoff Brown a6583be403 Bug 1376238 - Skip browser_hsts-priming_include-subdomains.js on linux for intermittent failures; r=me,test-only 2017-07-12 10:48:29 -06:00
Yoshi Huang 9ff74a50f4 Bug 1373513 - Part 3: Revert Bug 1363634. r=ckerschb
Revert what we did in Bug 1363634, from the spec, data:text/css should be same origin.
2017-07-12 11:00:34 +08:00
Christoph Kerschbaumer 250d4b1ff8 Bug 1377426 - Set CSP on freshly created nullprincipal when iframe is sandboxed. r=dveditz 2017-07-11 08:48:37 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Joel Maher a039d5288b Bug 1311239 - Intermittent dom/security/test/hsts/browser_hsts-priming_hsts_after_mixed.js. temporarily disable. r=gbrown
MozReview-Commit-ID: EWCAOjebfcH
2017-06-23 15:12:34 -04:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Paolo Amadini 10ee6a5c4e Bug 1362970 - Part 2 - Script-generated patch to convert .then(null, ...) to .catch(...). r=florian
Changes to Promise tests designed to test .then(null) have been reverted, and the browser/extensions directory was excluded because the projects it contains have a separate process for accepting changes.

MozReview-Commit-ID: 1buqgX1EP4P

--HG--
extra : rebase_source : 3a9ea310d3e4a8642aabbc10636c04bfe2e77070
2017-06-19 11:32:37 +01:00
Kate McKinley 396962011a Bug 1363546 - Store and report HSTS upgrade source r=francois,keeler,mayhemer p=francois
Add a field to the HSTS cache which indicates the source of the HSTS
entry if known, from the preload list, organically seen header, or HSTS
priming, or unknown otherwise. Also adds telemetry to collect the source
when upgrading in NS_ShouldSecureUpgrade.

MozReview-Commit-ID: 3IwyYe3Cn73

--HG--
extra : rebase_source : 9b8daac3aa02bd7a1b4285fb1e5731a817a76b7f
2017-05-23 15:31:37 -07:00
Christoph Kerschbaumer 829704554e Bug 1370788 - Move XFO out of nsDSURIContentListener.cpp into dom/security. r=smaug 2017-06-19 06:59:44 +02:00
Yoshi Huang 5dcdd16255 Bug 1267075 - Part 1: call SetBlockedRequest when CSP check failed. r=bz
As a follow-up from bug 1206961, we will remove calling CanLoadImage in
this bug. Also in the case of CSP check failed, we will call
SetBlockedRequest in those cases.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1267075#c30 for the
analysis between the old and new setup.
2017-06-16 10:12:08 +08:00
Kate McKinley 37a7ace256 Bug 1359987 - Update HSTS priming telemetry r=ckerschb,francois,mayhemer p=francois
Collect telemetry for all requests to get an exact percentage of
requests that are subject to HSTS priming, and how many result in an
HSTS Priming request being sent. Clean up telemetry to remove instances
of double counting requests if a priming request was sent.

HSTSPrimingListener::ReportTiming was using mCallback to calculate
timing telemetry, but we were calling swap() on the nsCOMPtr. Give it an
explicit argument for the callback.

Add tests for telemetry values to all of the HSTS priming tests. This
tests for the minimum as telemetry may be gathered on background or
other requests.

MozReview-Commit-ID: 5V2Nf0Ugc3r

--HG--
extra : rebase_source : daa357219a77d912a78b95a703430f39d884c6ab
2017-05-09 15:36:07 -07:00
Christoph Kerschbaumer 0d10a7c233 Bug 1024557 - Test XFO is ignored when frame-ancestors is present. r=smaug 2017-06-07 10:12:55 +02:00
Christoph Kerschbaumer 632fd14dfa Bug 1024557 - Ignore x-frame-options if CSP with frame-ancestors exists. r=smaug 2017-06-07 21:17:49 +02:00
Christoph Kerschbaumer b6b3bb161d Bug 1367531: Update CSP frame ancestors test to make sure paths are ignored. r=dveditz 2017-06-06 09:12:32 +02:00
Christoph Kerschbaumer 4956d67907 Bug 1367531: CSP should only check host (not including path) when performing frame ancestors checks. r=dveditz 2017-06-06 09:12:13 +02:00
Yoshi Huang 7aef584058 Bug 1363634 - rewrite test_style_crossdomain.html. r=ckerschb
data:text/css should be considered as a CORS request, and should be
blocked if crossorigin is not specified.
Also move the original test to test_style-crossdomain_legacy.html


--HG--
rename : dom/security/test/sri/iframe_style_crossdomain.html => dom/security/test/sri/iframe_style_crossdomain_legacy.html
2017-05-23 09:02:06 +08:00