Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for hasBadPathComponent (0.21 sec)

  1. cmd/generic-handlers.go

    		return nil
    	}
    	_, err := xnet.ParseHost(host)
    	return err
    }
    
    // Check if the incoming path has bad path components,
    // such as ".." and "."
    func hasBadPathComponent(path string) bool {
    	if len(path) > 4096 {
    		// path cannot be greater than Linux PATH_MAX
    		// this is to avoid a busy loop, that can happen
    		// if the caller sends path of following style
    		// a/a/a/a/a/a/a/a...
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:08:52 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  2. cmd/object-api-utils.go

    	}
    	return IsValidObjectPrefix(object)
    }
    
    // IsValidObjectPrefix verifies whether the prefix is a valid object name.
    // Its valid to have a empty prefix.
    func IsValidObjectPrefix(object string) bool {
    	if hasBadPathComponent(object) {
    		return false
    	}
    	if !utf8.ValidString(object) {
    		return false
    	}
    	if strings.Contains(object, `//`) {
    		return false
    	}
    	// This is valid for AWS S3 but it will never
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
Back to top