This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch macros
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/macros by this push:
new 5279804 Check if scripts are allowed, regardless of location
5279804 is described below
commit 527980417751d3436ed1bb0c99339ff371913922
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sat Oct 23 14:26:30 2021 +0200
Check if scripts are allowed, regardless of location
---
main/sfx2/source/doc/objmisc.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/main/sfx2/source/doc/objmisc.cxx b/main/sfx2/source/doc/objmisc.cxx
index 90c7c67..9144937 100644
--- a/main/sfx2/source/doc/objmisc.cxx
+++ b/main/sfx2/source/doc/objmisc.cxx
@@ -1707,9 +1707,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference<
XInterface >& _rxScriptCon
xServiceManager->createInstance( rtl::OUString::createFromAscii(
"com.sun.star.uri.UriReferenceFactory") ) , UNO_QUERY_THROW );
Reference< uri::XVndSunStarScriptUrlReference > xScriptUri(
xFac->parse( _rScriptURL ), UNO_QUERY_THROW );
- ::rtl::OUString sLocation = xScriptUri->getParameter( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "location" ) ) );
- bool bIsDocumentScript = ( sLocation == ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "document" ) ) );
- if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow(
_rxScriptContext ) )
+ if ( !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) )
return ERRCODE_IO_ACCESSDENIED;
// obtain/create a script provider