mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-06-22 02:38:06 +02:00
fix: validate self-host route URLs consistently
This commit is contained in:
parent
eede2f6953
commit
1c9def2fde
8 changed files with 26 additions and 10 deletions
|
|
@ -75,8 +75,9 @@ pub async fn diff_route(
|
|||
if req.url.trim().is_empty() {
|
||||
return Err(ApiError::bad_request("`url` is required"));
|
||||
}
|
||||
let url = webclaw_fetch::url_security::validate_public_http_url(&req.url).await?;
|
||||
|
||||
let current = state.fetch().fetch_and_extract(&req.url).await?;
|
||||
let current = state.fetch().fetch_and_extract(url.as_str()).await?;
|
||||
let previous = req.previous.into_extraction();
|
||||
let result = diff(&previous, ¤t);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue