File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ pub async fn download_image<'a>(
2626 }
2727
2828 // Check if UserAgent is valid
29+ /*
30+ * todo: this protection is temporarily disabled
31+ * because Misskey will hard-code media-proxy url to user's avatarUrl field,
32+ * which will definitely cause a recursive loop when media-proxy is enabled.
33+ * This feature should be re-enabled once this situation is resolved and
34+ * database all updated (or some old user may still facing broken image error).
35+
2936 if let Some(ua) = ua {
3037 if ua.to_lowercase().contains("misskey/") || ua.to_lowercase().contains("misskeymediaproxy")
3138 {
@@ -35,6 +42,8 @@ pub async fn download_image<'a>(
3542 }
3643 }
3744
45+ */
46+
3847 // Start download
3948 let url = url. unwrap ( ) ;
4049 let downloaded_file = match downloader. download_file ( url, host) . await {
You can’t perform that action at this time.
0 commit comments