mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
Add a user control mechanism to deny clipboard cut/copy.
This commit is contained in:
@@ -3227,6 +3227,12 @@ nsHTMLDocument::ExecCommand(const nsAString& commandID,
|
||||
// Special case for cut and copy.
|
||||
// Cut/copy are allowed in non-editable documents.
|
||||
if (isCutCopy) {
|
||||
// Emit a security error if the user explicitly disabled cut and copy.
|
||||
if (nsContentUtils::IsCutCopyRestricted() && !nsContentUtils::IsCallerChrome()) {
|
||||
rv = NS_ERROR_DOM_SECURITY_ERR;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::IsCutCopyAllowed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user