ploiu / file_server

a self-hostable file backup server, written in rust because crabs are funny
Apache License 2.0
0 stars 0 forks source link

single letter file names trip name regex when checking for duplicate collision #35

Closed ploiu closed 1 year ago

ploiu commented 1 year ago

this line

let name_regex = Regex::new(format!("{}$", file.name).as_str()).unwrap();

only checks the end of the file name, so naming a file something that matches what another file ends with will fail, even if the names don't fully collide