feat: add generated scene skill platform hardening
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user