TheAlgorythm / path-ratchet

Prevent path traversal attacks at type level

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path Ratchet

LGPL 3.0 License Crates.io Workflow Status crev reviews

Prevent path traversal attacks at type level.

use std::path::PathBuf;
use path_ratchet::prelude::*;

let user_input = "/etc/shadow";
let mut filename = PathBuf::from("/tmp");
filename.push_component(SingleComponentPath::new(user_input).unwrap());

About

Prevent path traversal attacks at type level

License:GNU Lesser General Public License v3.0


Languages

Language:Rust 100.0%