LibreOffice Module unotools (master) 1
|
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::Certificate > | GetTrustedAuthors () |
void | SetTrustedAuthors (const std::vector< Certificate > &rAuthors) |
bool | IsOptionSet (EOption eOption) |
void | SetOption (EOption eOption, bool bValue) |
|
strong |
Definition at line 36 of file securityoptions.hxx.
UNOTOOLS_DLLPUBLIC sal_Int32 SvtSecurityOptions::GetMacroSecurityLevel | ( | ) |
Definition at line 166 of file securityoptions.cxx.
References Translate::get(), and utl::ConfigManager::IsFuzzing().
Referenced by isTrustedLocationUriForUpdatingLinks().
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().
UNOTOOLS_DLLPUBLIC std::vector< Certificate > SvtSecurityOptions::GetTrustedAuthors | ( | ) |
Definition at line 189 of file securityoptions.cxx.
References utl::ConfigManager::acquireTree(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), utl::LocalPath, PROPERTYNAME_MACRO_TRUSTEDAUTHORS, PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA, PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER, PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME, SvtSecurityOptions::Certificate::RawData, SvtSecurityOptions::Certificate::SerialNumber, SvtSecurityOptions::Certificate::SubjectName, and u.
UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::IsMacroDisabled | ( | ) |
Definition at line 184 of file securityoptions.cxx.
References Translate::get(), and utl::ConfigManager::IsFuzzing().
UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::IsOptionSet | ( | EOption | eOption | ) |
Definition at line 265 of file securityoptions.cxx.
References BlockUntrustedRefererLinks, CtrlClickHyperlink, DocWarnCreatePdf, DocWarnPrint, DocWarnRecommendPassword, DocWarnRemovePersonalInfo, DocWarnSaveOrSend, DocWarnSigning, Translate::get(), and utl::ConfigManager::IsFuzzing().
Referenced by isUntrustedReferer().
UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::IsReadOnly | ( | EOption | eOption | ) |
Definition at line 48 of file securityoptions.cxx.
References BlockUntrustedRefererLinks, CtrlClickHyperlink, DocWarnCreatePdf, DocWarnPrint, DocWarnRecommendPassword, DocWarnRemovePersonalInfo, DocWarnSaveOrSend, DocWarnSigning, MacroSecLevel, MacroTrustedAuthors, and SecureUrls.
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().
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().
UNOTOOLS_DLLPUBLIC bool SvtSecurityOptions::isTrustedLocationUriForUpdatingLinks | ( | OUString const & | uri | ) |
Definition at line 159 of file securityoptions.cxx.
References GetMacroSecurityLevel(), and isTrustedLocationUri().
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().
UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetMacroSecurityLevel | ( | sal_Int32 | _nLevel | ) |
Definition at line 171 of file securityoptions.cxx.
References comphelper::ConfigurationChanges::create(), and utl::ConfigManager::IsFuzzing().
UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetOption | ( | EOption | eOption, |
bool | bValue | ||
) |
Definition at line 304 of file securityoptions.cxx.
References BlockUntrustedRefererLinks, comphelper::ConfigurationChanges::create(), CtrlClickHyperlink, DocWarnCreatePdf, DocWarnPrint, DocWarnRecommendPassword, DocWarnRemovePersonalInfo, DocWarnSaveOrSend, and DocWarnSigning.
UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetSecureURLs | ( | std::vector< OUString > && | urlList | ) |
Definition at line 107 of file securityoptions.cxx.
References comphelper::containerToSequence(), and comphelper::ConfigurationChanges::create().
UNOTOOLS_DLLPUBLIC void SvtSecurityOptions::SetTrustedAuthors | ( | const std::vector< Certificate > & | rAuthors | ) |
Definition at line 239 of file securityoptions.cxx.
References utl::ConfigManager::acquireTree(), i, comphelper::makePropertyValue(), PROPERTYNAME_MACRO_TRUSTEDAUTHORS, PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA, PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER, PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME, utl::ConfigItem::SetSetProperties(), and u.