From 18be6f161de20f3b0e05d0dd494242eda16ee5c4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 11 Nov 2013 17:44:57 +0100 Subject: Add "block untrusted referer links" switch Change-Id: Id2f2a3dafc3bb7ec6fada6bfda5843348dfac5a1 --- include/unotools/securityoptions.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/unotools') diff --git a/include/unotools/securityoptions.hxx b/include/unotools/securityoptions.hxx index b454c556691a..dd150f17daba 100644 --- a/include/unotools/securityoptions.hxx +++ b/include/unotools/securityoptions.hxx @@ -79,7 +79,8 @@ class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtSecurityOptions : public utl::detail E_MACRO_SECLEVEL, E_MACRO_TRUSTEDAUTHORS, E_MACRO_DISABLE, - E_CTRLCLICK_HYPERLINK + E_CTRLCLICK_HYPERLINK, + E_BLOCKUNTRUSTEDREFERERLINKS }; enum MacroAction @@ -188,6 +189,12 @@ class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtSecurityOptions : public utl::detail bool isSecureMacroUri(OUString const & uri, OUString const & referer) const; + /** + Check whether the given referer URI is untrusted, and links + originating from it should not be accessed. + */ + bool isUntrustedReferer(OUString const & referer) const; + /** Check whether the given uri is a trusted location. */ -- cgit