diff options
author | Moonchild <moonchild@palemoon.org> | 2022-02-10 22:21:40 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-05-30 08:28:11 +0000 |
commit | c048d762cff164733ca1db285335b8bb6011e5bb (patch) | |
tree | 7aab222106d2b371a88001661bf486f0398f44b5 /widget | |
parent | 39fe9559bb8fb5135feb895da3bd91ccc760e399 (diff) | |
download | uxp-c048d762cff164733ca1db285335b8bb6011e5bb.tar.gz |
[DOM] Don't allow internal MIME types to be assigned to DataTransfer
We already blocked x-moz-file(-promise) and x-moz-place* but of course people
would find ways to abuse other internal types. This change now blocks everything
except x-moz-url types which are harmless. (i.e. whitelist instead of blacklist)
Diffstat (limited to 'widget')
-rw-r--r-- | widget/nsITransferable.idl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/widget/nsITransferable.idl b/widget/nsITransferable.idl index b128586dd1..e580673f5e 100644 --- a/widget/nsITransferable.idl +++ b/widget/nsITransferable.idl @@ -13,12 +13,17 @@ interface nsIPrincipal; %{ C++ +// Internal formats must have their second part starting with 'x-moz-', +// for example text/x-moz-internaltype. These cannot be assigned by +// unprivileged content but all other types can. +#define kInternal_Mimetype_Prefix "/x-moz-" + // these probably shouldn't live here, but in some central repository shared // by the entire app. #define kTextMime "text/plain" #define kRTFMime "text/rtf" #define kUnicodeMime "text/unicode" -#define kMozTextInternal "text/x-moz-text-internal" // text data which isn't suppoed to be parsed by other apps. +#define kMozTextInternal "text/x-moz-text-internal" // text data which isn't suppoed to be parsed by other apps. #define kHTMLMime "text/html" #define kAOLMailMime "AOLMAIL" #define kPNGImageMime "image/png" |