~repos /rust-embed
git clone https://pyrossh.dev/repos/rust-embed.git
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
42bb1fee
—
Buckram 1 year ago
format
- 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()?;
|