Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestInsecurePaths (0.13 sec)

  1. src/archive/tar/reader_test.go

    				}
    			default:
    				t.Fatalf("test %d.%d, unknown test operation: %T", i, j, tf)
    			}
    		}
    	}
    }
    
    func TestInsecurePaths(t *testing.T) {
    	t.Setenv("GODEBUG", "tarinsecurepath=0")
    	for _, path := range []string{
    		"../foo",
    		"/foo",
    		"a/b/../../../c",
    	} {
    		var buf bytes.Buffer
    		tw := NewWriter(&buf)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 03 15:48:09 UTC 2024
    - 46.9K bytes
    - Viewed (0)
  2. src/archive/zip/reader_test.go

    				n, got := io.Copy(io.Discard, rd)
    				if n != 0 || got != ErrFormat {
    					t.Fatalf("Error mismatch, got: %d, %v, want: %v", n, got, ErrFormat)
    				}
    			})
    		}
    	}
    }
    
    func TestInsecurePaths(t *testing.T) {
    	t.Setenv("GODEBUG", "zipinsecurepath=0")
    	for _, path := range []string{
    		"../foo",
    		"/foo",
    		"a/b/../../../c",
    		`a\b`,
    	} {
    		var buf bytes.Buffer
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jul 25 00:25:45 UTC 2024
    - 55.6K bytes
    - Viewed (0)
Back to top