From 47c3b54d1d0b276fb87d1b4b71a584e0e0c7b43d Mon Sep 17 00:00:00 2001 From: Vika Shleina Date: Mon, 19 Jul 2021 10:32:42 +0300 Subject: Relaxed anti-takeover URL check to simply not place redirects at foreign URLs --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 91dd340..0ea7860 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -164,7 +164,10 @@ mod tests { }), ) .await; - assert_eq!(response.status(), 403); + // Should be posted successfully, but... + assert!(response.status() == 201 || response.status() == 202); + // ...won't be available on a foreign URL + assert!(db.get_post("https://aaronparecki.com/posts/more-fake-news").await.unwrap().is_none()); let response = post_json(&app, json!({ "type": ["h-entry"], -- cgit 1.4.1