reallink-cli 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -2
- package/prebuilt/linux-x64/reallink-cli +0 -0
- package/rust/Cargo.lock +1 -1
- package/rust/Cargo.toml +1 -1
- package/rust/src/main.rs +13 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reallink-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Rust-based CLI for Reallink auth and API operations",
|
|
5
5
|
"bin": {
|
|
6
6
|
"reallink": "bin/reallink.cjs"
|
|
@@ -33,9 +33,12 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
36
|
-
"url": "https://github.com/real-link-tech/ReallinkOS.git",
|
|
36
|
+
"url": "git+https://github.com/real-link-tech/ReallinkOS.git",
|
|
37
37
|
"directory": "packages/reallink-cli"
|
|
38
38
|
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/real-link-tech/ReallinkOS/issues"
|
|
41
|
+
},
|
|
39
42
|
"homepage": "https://github.com/real-link-tech/ReallinkOS/tree/main/packages/reallink-cli",
|
|
40
43
|
"publishConfig": {
|
|
41
44
|
"access": "public"
|
|
Binary file
|
package/rust/Cargo.lock
CHANGED
package/rust/Cargo.toml
CHANGED
package/rust/src/main.rs
CHANGED
|
@@ -7635,14 +7635,22 @@ fn resolve_safe_path_allow_missing(
|
|
|
7635
7635
|
) -> Option<std::path::PathBuf> {
|
|
7636
7636
|
for root in allowed_roots {
|
|
7637
7637
|
let candidate = root.join(path_str);
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7638
|
+
let canonical_root = match root.canonicalize() {
|
|
7639
|
+
Ok(value) => value,
|
|
7640
|
+
Err(_) => continue,
|
|
7641
|
+
};
|
|
7642
|
+
if !candidate.starts_with(root) {
|
|
7643
|
+
continue;
|
|
7644
|
+
}
|
|
7645
|
+
let mut probe = Some(candidate.as_path());
|
|
7646
|
+
while let Some(current) = probe {
|
|
7647
|
+
if let Ok(resolved_current) = current.canonicalize() {
|
|
7648
|
+
if resolved_current.starts_with(&canonical_root) {
|
|
7641
7649
|
return Some(candidate);
|
|
7642
7650
|
}
|
|
7651
|
+
break;
|
|
7643
7652
|
}
|
|
7644
|
-
|
|
7645
|
-
return Some(candidate);
|
|
7653
|
+
probe = current.parent();
|
|
7646
7654
|
}
|
|
7647
7655
|
}
|
|
7648
7656
|
None
|