Skip to main content

validate_upstream_source

Function validate_upstream_source 

Source
pub fn validate_upstream_source(source: &str) -> Result<()>
Expand description

Validate a fork or mirror upstream source before passing it to git.

Accepts only URLs with a scheme from UPSTREAM_SOURCE_SCHEMES and a non-empty host, without whitespace or control characters, and at most MAX_UPSTREAM_SOURCE_LEN bytes long. rns:// sources must be canonical rns://<destination_hash>/<repository> URLs.