Skip to main content

read_nofollow

Function read_nofollow 

Source
pub fn read_nofollow(path: impl AsRef<Path>) -> Result<String, CoreError>
Expand description

Read a file to a string, refusing to follow a symlink at the final or any parent component.

Fails with ELOOP if path is a symlink or passes through one. Used for reading attacker-placed state files so their contents can never be injected through a link.