~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git
Discussions: https://groups.google.com/g/rust-embed-devs

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


Files changed (1) hide show
  1. impl/src/lib.rs +1 -1
impl/src/lib.rs CHANGED
@@ -144,7 +144,7 @@ fn dynamic(ident: &syn::Ident, folder_path: String, prefix: Option<&str>, includ
144
144
 
145
145
  // Should be allowed only if it was a symlink
146
146
  // TODO: Currently it allows "path_traversal_attack" for the symlink files
147
- // For it to be working properly we need to get absolute path first
147
+ // For it to be working properly we need to get absolute path first
148
148
  // and check that instead if it starts with `canonical_folder_path`
149
149
  // https://doc.rust-lang.org/std/path/fn.absolute.html (currently nightly)
150
150
  let metadata = ::std::fs::metadata(file_path.as_path()).ok()?;