Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for prevented (4.08 sec)

  1. src/test/java/jcifs/smb1/smb1/AndXServerMessageBlockTest.java

        @DisplayName("writeAndXWireFormat with andx but batching prevented by limit")
        void testWriteAndXWireFormatBatchingPrevented() {
            DummyPlainSMB next = new DummyPlainSMB();
            DummyAndXBlock block = new DummyAndXBlock(next);
            block.customBatchLimit = 1; // allow 1, but we'll set batchLevel to meet limit
            block.batchLevel = 1; // batchLevel >= limit prevents chaining
    
            byte[] buf = new byte[128];
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbSessionImplSecurityTest.java

            }
    
            assertEquals(threadCount * opsPerThread, successCount.get(), "All operations should succeed");
        }
    
        /**
         * Test that session release with double-check pattern prevents race conditions.
         */
        @Test
        public void testSessionReleaseDoubleCheckPattern() throws Exception {
            // Given
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/io/FileUtil.java

    /**
     * Utility class for handling {@link File}.
     * <p>
     * <strong>SECURITY NOTE:</strong> When accepting file paths from untrusted sources,
     * always validate them using {@link #isPathSafe(Path, Path)} to prevent path traversal attacks.
     * Methods that accept path strings do not perform automatic validation to maintain backward compatibility.
     * </p>
     *
     * @author higa
     */
    public abstract class FileUtil {
    
        /**
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Sat Nov 22 11:21:59 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/util/InputValidator.java

     */
    package jcifs.util;
    
    import java.util.regex.Pattern;
    
    /**
     * Comprehensive input validation utility for SMB protocol implementation.
     * Provides validation methods to prevent buffer overflows, injection attacks,
     * and other security vulnerabilities.
     */
    public final class InputValidator {
    
        private InputValidator() {
            // Utility class
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

                throw new RuntimeCIFSException("Usage count dropped below zero");
            }
        }
    
        @Override
        protected void finalize() throws Throwable {
            try {
                // Add null check to prevent NPE if object was not fully constructed
                if (this.usageCount != null && this.usageCount.get() != 0) {
                    log.warn("Tree handle was not properly released, performing emergency cleanup: "
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java

            return new EncryptionResult(ciphertext, authTag);
        }
    
        /**
         * Perform constant-time encryption to prevent timing attacks
         */
        private byte[] performConstantTimeEncryption(Cipher cipher, byte[] message) throws Exception {
            // Pad to fixed block size to prevent timing leaks
            int blockSize = cipher.getBlockSize();
            if (blockSize == 0)
                blockSize = 16; // GCM mode
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  7. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/fs/FileSystemClientTest.java

                assertTrue(e.getCause() instanceof InterruptedException);
            }
        }
    
        public void test_concurrent_initialization() throws Exception {
            // Test that compareAndSet prevents multiple initializations
            final FileSystemClient client = new FileSystemClient();
            final int threadCount = 10;
            final Thread[] threads = new Thread[threadCount];
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Wed Nov 19 08:59:28 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbFileTest.java

            // Mock configuration methods
            when(mockConfig.getPid()).thenReturn(1234);
            when(mockCifsContext.getConfig()).thenReturn(mockConfig);
    
            // Mock credentials to prevent NPE
            when(mockCredentials.getUserDomain()).thenReturn("DOMAIN");
            when(mockCifsContext.getCredentials()).thenReturn(mockCredentials);
    
            // Create URL handler
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/dcerpc/rpc.java

     * This class contains NDR (Network Data Representation) encodable/decodable structures
     * used in DCE/RPC communications.
     */
    public class rpc {
    
        /**
         * Private constructor to prevent instantiation of utility class.
         */
        private rpc() {
            // Utility class
        }
    
        /**
         * UUID (Universally Unique Identifier) structure for DCE/RPC.
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/util/AuthenticationRateLimiter.java

    import java.util.concurrent.atomic.AtomicLong;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
    import jcifs.smb.SmbException;
    
    /**
     * Rate limiter for authentication attempts to prevent brute force attacks.
     *
     * Features:
     * - Per-account rate limiting
     * - Per-IP rate limiting
     * - Global rate limiting
     * - Exponential backoff for repeated failures
     * - Account lockout after threshold
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.1K bytes
    - Viewed (0)
Back to top