summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/docshell/docsh4.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index c1ee001cf393..24a64345b759 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -151,7 +151,14 @@ ScLkUpdMode ScDocShell::GetLinkUpdateModeState() const
}
}
- if (nSet == LM_ALWAYS
+ if (nSet != LM_NEVER
+ && (SvtSecurityOptions::isUntrustedReferer(
+ GetMedium() == nullptr ? OUString() : GetMedium()->GetName())
+ || (IsDocShared() && SvtSecurityOptions::isUntrustedReferer(GetSharedFileURL()))))
+ {
+ nSet = LM_NEVER;
+ }
+ else if (nSet == LM_ALWAYS
&& !(SvtSecurityOptions::isTrustedLocationUriForUpdatingLinks(
GetMedium() == nullptr ? OUString() : GetMedium()->GetName())
|| (IsDocShared()