feat: add generated scene skill platform hardening

This commit is contained in:
木炎
2026-04-21 23:19:06 +08:00
parent 118fc77935
commit 956f0c2b68
439 changed files with 61974 additions and 3645 deletions

View File

@@ -196,13 +196,10 @@ fn normalize_local_dashboard_path(raw: &str) -> String {
}
fn normalize_local_dashboard_file_url(raw: &str) -> Result<String, SecurityError> {
let path = raw
.trim()
.strip_prefix("file:///")
.ok_or_else(|| {
SecurityError::InvalidLocalDashboard(
"local dashboard presentation_url must be file:///".to_string(),
)
})?;
let path = raw.trim().strip_prefix("file:///").ok_or_else(|| {
SecurityError::InvalidLocalDashboard(
"local dashboard presentation_url must be file:///".to_string(),
)
})?;
Ok(normalize_local_dashboard_path(path))
}