mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-03 19:17:29 -05:00 
			
		
		
		
	caddyhttp: Test cases for %2F and %252F (#6084)
				
					
				
			This commit is contained in:
		
							parent
							
								
									bc1e63198d
								
							
						
					
					
						commit
						bde46211e3
					
				@ -65,6 +65,16 @@ func TestSanitizedPathJoin(t *testing.T) {
 | 
			
		||||
			inputPath: "/%2e%2e%2f%2e%2e%2f",
 | 
			
		||||
			expect:    filepath.Join("/", "a", "b") + separator,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			inputRoot: "/a/b",
 | 
			
		||||
			inputPath: "/foo%2fbar",
 | 
			
		||||
			expect:    filepath.Join("/", "a", "b", "foo", "bar"),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			inputRoot: "/a/b",
 | 
			
		||||
			inputPath: "/foo%252fbar",
 | 
			
		||||
			expect:    filepath.Join("/", "a", "b", "foo%2fbar"),
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			inputRoot: "C:\\www",
 | 
			
		||||
			inputPath: "/foo/bar",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user