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

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 7eaea5a7a6 ARTEMIS-5172: Reduce the permissions on temp file.
7eaea5a7a6 is described below

commit 7eaea5a7a6b09b92c5ef0b73a5adaceb8b485ac6
Author: Emmanuel Hugonnet <[email protected]>
AuthorDate: Fri Dec 13 16:42:47 2024 +0100

    ARTEMIS-5172: Reduce the permissions on temp file.
    
    *  Ensure that the temproray large message content can only be read by the
        user associated with the process.
    * Fixing initial ARTEMIS-5172 PR which wasn't removing rw permissions.
    
    Issue: https://issues.apache.org/jira/browse/ARTEMIS-5172
    
    Signed-off-by: Emmanuel Hugonnet <[email protected]>
---
 .../activemq/artemis/core/client/impl/ClientConsumerImpl.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
index 871db154df..7628a4dc61 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
@@ -651,9 +651,9 @@ public final class ClientConsumerImpl implements 
ClientConsumerInternal {
 
    private File createLargeMessageCache(long messageId) throws IOException {
       File largeMessageCache = File.createTempFile("tmp-large-message-" + 
messageId + "-", ".tmp");
-      largeMessageCache.setReadable(false);
-      largeMessageCache.setExecutable(false);
-      largeMessageCache.setWritable(false);
+      largeMessageCache.setReadable(false, false);
+      largeMessageCache.setExecutable(false, false);
+      largeMessageCache.setWritable(false, false);
       largeMessageCache.setReadable(true, true);
       largeMessageCache.setWritable(true, true);
       largeMessageCache.deleteOnExit();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to