diff options
author | Vika Shleina <vika@fireburn.ru> | 2021-07-19 10:32:42 +0300 |
---|---|---|
committer | Vika Shleina <vika@fireburn.ru> | 2021-07-19 10:55:32 +0300 |
commit | 47c3b54d1d0b276fb87d1b4b71a584e0e0c7b43d (patch) | |
tree | 9b9b9d2512a91da502187d17cb9c1e5dce398009 /src/lib.rs | |
parent | 8399371adc5c48e1847061deee1936c0d64f2a85 (diff) | |
download | kittybox-47c3b54d1d0b276fb87d1b4b71a584e0e0c7b43d.tar.zst |
Relaxed anti-takeover URL check to simply not place redirects at foreign URLs
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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"], |