LibreOffice Module unotools (master) 1
Classes | Enumerations | Functions
SvtSecurityOptions Namespace Reference

Classes

struct  Certificate
 

Enumerations

enum class  EOption {
  SecureUrls ,
  DocWarnSaveOrSend ,
  DocWarnSigning ,
  DocWarnPrint ,
  DocWarnCreatePdf ,
  DocWarnRemovePersonalInfo ,
  DocWarnRecommendPassword ,
  MacroSecLevel ,
  MacroTrustedAuthors ,
  CtrlClickHyperlink ,
  BlockUntrustedRefererLinks
}
 

Functions

bool IsReadOnly (EOption eOption)
 
std::vector< OUString > GetSecureURLs ()
 
void SetSecureURLs (std::vector< OUString > &&urlList)
 
bool isSecureMacroUri (OUString const &uri, OUString const &referer)
 Check whether the given uri is either no dangerous macro-execution URI at all or else the given referer is a trusted source. More...
 
bool isUntrustedReferer (OUString const &referer)
 Check whether the given referer URI is untrusted, and links originating from it should not be accessed. More...
 
bool isTrustedLocationUri (OUString const &uri)
 Check whether the given uri is a trusted location. More...
 
bool isTrustedLocationUriForUpdatingLinks (OUString const &uri)
 
sal_Int32 GetMacroSecurityLevel ()
 
void SetMacroSecurityLevel (sal_Int32 _nLevel)
 
bool IsMacroDisabled ()
 
std::vector< SvtSecurityOptions::CertificateGetTrustedAuthors ()
 
void SetTrustedAuthors (const std::vector< Certificate > &rAuthors)
 
bool IsOptionSet (EOption eOption)
 
void SetOption (EOption eOption, bool bValue)
 

Enumeration Type Documentation

◆ EOption

enum class SvtSecurityOptions::EOption
strong
Enumerator
SecureUrls 
DocWarnSaveOrSend 
DocWarnSigning 
DocWarnPrint 
DocWarnCreatePdf 
DocWarnRemovePersonalInfo 
DocWarnRecommendPassword 
MacroSecLevel 
MacroTrustedAuthors 
CtrlClickHyperlink 
BlockUntrustedRefererLinks 

Definition at line 36 of file securityoptions.hxx.

Function Documentation

◆ GetMacroSecurityLevel()

UNOTOOLS_DLLPUBLIC sal_Int32 SvtSecurityOptions::GetMacroSecurityLevel ( )

◆ GetSecureURLs()

UNOTOOLS_DLLPUBLIC std::vector< OUString > SvtSecurityOptions::GetSecureURLs ( )

Definition at line 95 of file securityoptions.cxx.

References Translate::get(), and utl::ConfigManager::IsFuzzing().

Referenced by isTrustedLocationUri().

◆ GetTrustedAuthors()

UNOTOOLS_DLLPUBLIC std::vector< Certificate > SvtSecurityOptions::GetTrustedAuthors ( )

◆ IsMacroDisabled()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::IsMacroDisabled ( )

Definition at line 184 of file securityoptions.cxx.

References Translate::get(), and utl::ConfigManager::IsFuzzing().

◆ IsOptionSet()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::IsOptionSet ( EOption  eOption)

◆ IsReadOnly()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::IsReadOnly ( EOption  eOption)

◆ isSecureMacroUri()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::isSecureMacroUri ( OUString const &  uri,
OUString const &  referer 
)

Check whether the given uri is either no dangerous macro-execution URI at all or else the given referer is a trusted source.

Definition at line 121 of file securityoptions.cxx.

References isTrustedLocationUri().

◆ isTrustedLocationUri()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::isTrustedLocationUri ( OUString const &  uri)

Check whether the given uri is a trusted location.

Definition at line 147 of file securityoptions.cxx.

References GetSecureURLs(), and utl::UCBContentHelper::IsSubPath().

Referenced by isSecureMacroUri(), isTrustedLocationUriForUpdatingLinks(), and isUntrustedReferer().

◆ isTrustedLocationUriForUpdatingLinks()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::isTrustedLocationUriForUpdatingLinks ( OUString const &  uri)

Definition at line 159 of file securityoptions.cxx.

References GetMacroSecurityLevel(), and isTrustedLocationUri().

◆ isUntrustedReferer()

UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::isUntrustedReferer ( OUString const &  referer)

Check whether the given referer URI is untrusted, and links originating from it should not be accessed.

Definition at line 140 of file securityoptions.cxx.

References BlockUntrustedRefererLinks, IsOptionSet(), and isTrustedLocationUri().

Referenced by utl::MediaDescriptor::impl_openStreamWithURL().

◆ SetMacroSecurityLevel()

UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetMacroSecurityLevel ( sal_Int32  _nLevel)

◆ SetOption()

UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetOption ( EOption  eOption,
bool  bValue 
)

◆ SetSecureURLs()

UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetSecureURLs ( std::vector< OUString > &&  urlList)

◆ SetTrustedAuthors()

UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetTrustedAuthors ( const std::vector< Certificate > &  rAuthors)