shell/Library_syssh.mk           |    4 ++++
 shell/source/win32/SysShExec.cxx |    9 +++++++++
 sw/inc/fesh.hxx                  |    2 +-
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 2e310ad3bbe77fb264bd066faa711226ce8d8835
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Jan 7 08:59:25 2025 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Feb 14 11:25:37 2025 +0100

    check if non-file uris could be interpreted as a file system pathname
    
    Change-Id: If283bec44ad1d648c68a5d0f028855e09c09017e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179868
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 400970acf4241632d084f66275161fc4b4ac1b21)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179990
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit df54e1e3532584ee11c6ebb54a35302a5c5f6201)

diff --git a/shell/Library_syssh.mk b/shell/Library_syssh.mk
index 72ff73842dc3..27657c4456aa 100644
--- a/shell/Library_syssh.mk
+++ b/shell/Library_syssh.mk
@@ -25,6 +25,10 @@ $(eval $(call gb_Library_use_system_win32_libs,syssh,\
        shell32 \
 ))
 
+$(eval $(call gb_Library_use_libraries,syssh,\
+       tl \
+))
+
 $(eval $(call 
gb_Library_set_componentfile,syssh,shell/source/win32/syssh,services))
 
 $(eval $(call gb_Library_add_exception_objects,syssh,\
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 57e59f96b6f0..41c9fd3be7fe 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -38,6 +38,7 @@
 #include <o3tl/runtimetooustring.hxx>
 #include <o3tl/safeCoInitUninit.hxx>
 #include <o3tl/string_view.hxx>
+#include <tools/urlobj.hxx>
 
 #include <prewin.h>
 #include <Shlobj.h>
@@ -360,6 +361,14 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
                     }
                 }
             }
+        } else {
+            // Filter out input that technically is a non-file URI, but could 
be interpreted by
+            // ShellExecuteExW as a file system pathname.
+            if (INetURLObject(aCommand, INetProtocol::File).GetProtocol() == 
INetProtocol::File) {
+                throw css::lang::IllegalArgumentException(
+                    "XSystemShellExecute.execute URIS_ONLY with non-URI 
pathname " + aCommand,
+                    getXWeak(), 0);
+            }
         }
     }
 
commit 53c2a9926a650fc03cfd5da0d9bfaf8132e34652
Author:     Michael Stahl <[email protected]>
AuthorDate: Fri Feb 14 11:24:11 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Feb 14 11:25:37 2025 +0100

    sw: fix error C2487
    
    error C2487: 'SetBoxAlign': member of dll interface class may not be 
declared with dll interface`
    
    Change-Id: I666ae1d6d5f0eae438530bcce74d279b79bfb2ea

diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 6aff99bb31fe..f9dba741b955 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -671,7 +671,7 @@ public:
     void SetRowSplit( const SwFormatRowSplit &rSz );
     std::unique_ptr<SwFormatRowSplit> GetRowSplit() const;
 
-    SW_DLLPUBLIC void SetBoxAlign(sal_uInt16 nOrient);
+    void SetBoxAlign(sal_uInt16 nOrient);
     sal_uInt16 GetBoxAlign() const;         ///< USHRT_MAX if ambiguous.
 
     bool BalanceRowHeight( bool bTstOnly, const bool bOptimize = false );

Reply via email to