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/12/08 20:47:27 UTC

[openoffice] branch AOO41X updated: More checks

This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
     new c1f051c3b2 More checks
c1f051c3b2 is described below

commit c1f051c3b277b9deb12801f4ac73af0b5134d53d
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Tue Dec 6 21:22:57 2022 +0100

    More checks
    
    (cherry picked from commit a17d592dd780140ccf35c2d69f72c695e96bd8bf)
---
 main/sfx2/source/appl/appuno.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/main/sfx2/source/appl/appuno.cxx b/main/sfx2/source/appl/appuno.cxx
index c52e73615b..eac20c85de 100644
--- a/main/sfx2/source/appl/appuno.cxx
+++ b/main/sfx2/source/appl/appuno.cxx
@@ -1949,6 +1949,9 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
     else
     {
         // direct API call on a specified object
+        if ( !pCurrent->AdjustMacroMode( String() ) )
+            // check forbids execution
+            return ERRCODE_IO_ACCESSDENIED;
         String aCall( '[' );
         aCall += String(INetURLObject::decode(aMacro.Copy(6), INET_HEX_ESCAPE,
         INetURLObject::DECODE_WITH_CHARSET));