Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for backslashes (0.08 sec)

  1. src/test/java/jcifs/util/PathValidatorTest.java

            // To properly test UNC rejection, we would need to fix the normalization logic
            // to preserve the leading double backslash for UNC paths
        }
    
        @Test
        public void testInvalidUncPath() throws Exception {
            // Due to normalization removing duplicate backslashes, true UNC validation doesn't work
            // These tests validate current behavior where problematic paths are caught by other checks
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.6K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/util/GsaConfigParser.java

                return Pattern.quote(s.substring(0, s.length() - 1)) + "$";
            }
            return Pattern.quote(s);
        }
    
        /**
         * Unescapes double backslashes in regex patterns.
         * Converts escaped backslashes (\\) back to single backslashes (\).
         *
         * @param s the string to unescape
         * @return the unescaped string
         */
        protected String unescape(final String s) {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 21.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/dfs/DfsReferralRequestBufferTest.java

                assertEquals(buffer.size(), bytesEncoded);
                assertEquals(4 + 2 * path.length(), bytesEncoded);
            }
    
            @Test
            @DisplayName("Should handle path with only backslashes")
            void testPathWithOnlyBackslashes() {
                String path = "\\\\\\\\\\\\";
                buffer = new DfsReferralRequestBuffer(path, 2);
    
                byte[] dst = new byte[buffer.size()];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/dfs/DfsReferralDataImplTest.java

                assertEquals(expectedPath.isEmpty() ? "" : expectedPath, result.getPath());
            }
    
            @Test
            @DisplayName("Should handle path with multiple backslashes")
            void testPathWithMultipleBackslashes() {
                when(mockReferral.getTtl()).thenReturn(300);
                when(mockReferral.getRFlags()).thenReturn(0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 30.6K bytes
    - Viewed (0)
  5. gradlew

    #
    # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
    #
    # In Bash we could simply go:
    #
    #   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
    #   set -- "${ARGS[@]}" "$@"
    #
    # but POSIX shell has neither arrays nor command substitution, so instead we
    # post-process each arg (as a line of input to sed) to backslash-escape any
    # character that might be a shell metacharacter, then use eval to reverse
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 08:06:31 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/dcerpc/msrpc/MsrpcShareEnumTest.java

            MsrpcShareEnum shareEnum = new MsrpcShareEnum(TEST_SERVER_NAME);
            assertNotNull(shareEnum);
    
            // Verify the server name is properly formatted with double backslashes
            try {
                Field servernameField = srvsvc.ShareEnumAll.class.getDeclaredField("servername");
                servernameField.setAccessible(true);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  7. cmd/generic-handlers_test.go

    		}
    	}
    }
    
    func Benchmark_hasBadPathComponent(t *testing.B) {
    	tests := []struct {
    		name  string
    		input string
    		want  bool
    	}{
    		{name: "empty", input: "", want: false},
    		{name: "backslashes", input: `\a\a\ \\  \\\\\\\`, want: false},
    		{name: "long", input: strings.Repeat("a/", 2000), want: false},
    		{name: "long-fail", input: strings.Repeat("a/", 2000) + "../..", want: true},
    	}
    	for _, tt := range tests {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/create/Smb2CreateRequestTest.java

            request.setPath("third\\path\\");
            assertEquals("\\third\\path", request.getPath());
    
            // Multiple leading backslashes - only first one gets stripped, then trailing ones get stripped
            // But getPath() adds a backslash at the beginning, so \\fourth\path\\ becomes \fourth\path\
            request.setPath("\\\\fourth\\path\\\\");
            assertEquals("\\\\fourth\\path\\", request.getPath());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/util/PathValidator.java

                }
            }
    
            return false;
        }
    
        /**
         * Normalize a path
         */
        private String normalizePath(String path) {
            // Replace forward slashes with backslashes for consistency
            String normalized = path.replace('/', '\\');
    
            // Remove duplicate slashes
            normalized = normalized.replaceAll("\\\\+", "\\\\");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java

            when(dr.getPathConsumed()).thenReturn(2); // consume leading \\ from UNC
    
            String newUnc = l.handleDFSReferral(dr, "\\req\\");
            // dunc is "\\" + path + remaining  - note: path may not have leading backslashes
            assertTrue(newUnc.contains("dfs/path") || newUnc.contains("dfs\\path"));
            assertEquals(dr, l.getDfsReferral());
            assertEquals("dfs-server", l.getServerWithDfs());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
Back to top