This moves the checking code back to NS_SniffContent and specifically
checks requests for either:
- Empty `Content-type` header, OR
- A known JSON MIME type
If present, sniffing is allowed despite `nosniff` because in the first
case this is webmaster error (conflicting `nosniff` without MIME type
would always fail, so sniff it), and in the second case we need this
carveout or our json viewer will break.
This fixes a regression for the JSON viewer from part 1 as it relies on
sniffing to prettify (and should carve out the exception even if `nosniff`
headers are sent).
No real functional changes otherwise. Just catering to a corner case.
Protobuf uses `dynamic_cast` on polymorphic types which cannot be
inferred properly at compile-time, which can lead to unexpected behavior.
As a code safety measure, enable C++ RTTI for protobuf.
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), a choice was made
to pass the triggering principal whenever possible, but use the loading
principal to determine the origin URL.
The unversioned libGL is preferred on OpenBSD and NetBSD because
both (a) always install it (b) have forks of X11 with different
ABI versions. However, many Linux distributions do not ship
unversioned .so symlinks unless you install -dev packages.
Unfortunately also needs to be fixed in ANGLE which has the same
problem.
Adds 0-9, #, and * as simple pictographs.
Duplicates (C), (R), (TM), and (M) with the Keycap suffix.
Turns Combining Enclosing Keycap into a zero-width character.
Includes partially qualified and unqualified codepoints for all Emojis except (C), (R), (TM), and (M).
Updates Martinique flag.
Uses True South flag for Antarctica.