You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2022/03/17 19:39:13 UTC
[openoffice] 05/05: Check if scripts are allowed, regardless of location
This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 5aea3bf71c1cc083bd5dbc0ba7ff7d378a339319
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Sat Oct 23 14:26:30 2021 +0200
Check if scripts are allowed, regardless of location
(cherry picked from commit aea5254635d14376dd83e528769fd1dec8f7dbd7)
---
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