Nitter.net images not embedding on Discord #804

Open
opened 2023-03-05 17:38:32 -05:00 by avasilic · 9 comments
avasilic commented 2023-03-05 17:38:32 -05:00 (Migrated from github.com)

Hi there,

I'm having a strange issue on Discord when trying to use a Nitter Image URL such as https://nitter.net/pic/media%2FFqfM3xIXoAINbKM.jpg in a Embed. The image will not appear however any other image jpg from the web works just fine:
Nitter Image Test
CleanShot 2023-03-05 at 23 36 03@2x
A random JPG from Wikipedia
CleanShot 2023-03-05 at 23 36 12@2x

I asked in a development server on Discord and was told

that host may have some sort of hotlink protection or something that prevents the image from being loaded from another host
just tried it and it also won't embed, so its an issue with the image or the image host

So I'm just opening this to ask whether that is the case. Thanks.

Hi there, I'm having a strange issue on Discord when trying to use a Nitter Image URL such as `https://nitter.net/pic/media%2FFqfM3xIXoAINbKM.jpg` in a Embed. The image will not appear however any other image jpg from the web works just fine: Nitter Image Test <img width="286" alt="CleanShot 2023-03-05 at 23 36 03@2x" src="https://user-images.githubusercontent.com/74873375/222989808-65011cd9-a082-4a03-8ecc-d0afb6ceb524.png"> A random JPG from Wikipedia <img width="492" alt="CleanShot 2023-03-05 at 23 36 12@2x" src="https://user-images.githubusercontent.com/74873375/222989818-ec1275f4-5823-43e0-9da3-a03bbf48eea6.png"> I asked in a development server on Discord and was told > that host may have some sort of hotlink protection or something that prevents the image from being loaded from another host > just tried it and it also won't embed, so its an issue with the image or the image host So I'm just opening this to ask whether that is the case. Thanks.
zedeus commented 2023-03-05 18:16:40 -05:00 (Migrated from github.com)

No idea why this is, another host (nitter.nl) with no unnecessary security headers also won't embed.

No idea why this is, another host (nitter.nl) with no unnecessary security headers also won't embed.
avasilic commented 2023-03-09 06:44:35 -05:00 (Migrated from github.com)

I've made my bot upload Nitter's image to imgur for now and embed that.

I've made my bot upload Nitter's image to imgur for now and embed that.
avasilic commented 2023-08-11 16:51:44 -04:00 (Migrated from github.com)

As of today, Discord released an Embed Debug tool. Custom instance embeds work fine, however, when debugging why nitter.net images still won't embed using the debug tool, I got this reason from the debugger @zedeus
CleanShot 2023-08-11 at 22 48 50@2x

As of today, Discord released an Embed Debug tool. Custom instance embeds work fine, however, when debugging why nitter.net images still won't embed using the debug tool, I got this reason from the debugger @zedeus <img width="1122" alt="CleanShot 2023-08-11 at 22 48 50@2x" src="https://github.com/zedeus/nitter/assets/74873375/41c352ef-1cd9-440e-be41-a947ae69a4cc">
zedeus commented 2023-08-11 16:55:02 -04:00 (Migrated from github.com)

I guess it's probably due to the IP address/range being blocked by my extensive cloud blocking rules. Any idea which IP(s) they might use to pull embeds?

I guess it's probably due to the IP address/range being blocked by my extensive cloud blocking rules. Any idea which IP(s) they might use to pull embeds?
avasilic commented 2023-08-11 16:56:21 -04:00 (Migrated from github.com)

I guess it's probably due to the IP address/range being blocked by my extensive cloud-blocking rules. Any idea which IP(s) they might use to pull embeds?

Not sure which exact ones. All I know is they use Google Cloud and Cloudflare as far as their infrastructure goes.

> I guess it's probably due to the IP address/range being blocked by my extensive cloud-blocking rules. Any idea which IP(s) they might use to pull embeds? Not sure which exact ones. All I know is they use Google Cloud and Cloudflare as far as their infrastructure goes.
zedeus commented 2023-08-11 16:58:23 -04:00 (Migrated from github.com)

That's tricky, I don't want to unban GCP ranges because of all the abuse that comes from them, not sure what to do about this.

That's tricky, I don't want to unban GCP ranges because of all the abuse that comes from them, not sure what to do about this.
avasilic commented 2023-08-11 17:03:12 -04:00 (Migrated from github.com)

That's tricky, I don't want to unban GCP ranges because of all the abuse that comes from them, not sure what to do about this.

If you're talking about DDoS attacks, it might be useful to put nitter.net behind CloudFlare too. If it's something else, you could report it to GCP via their Abuse Report Form. However, I understand how this could be tedious. I guess we could keep this issue open and pin it in that case.

> That's tricky, I don't want to unban GCP ranges because of all the abuse that comes from them, not sure what to do about this. If you're talking about DDoS attacks, it might be useful to put nitter.net behind CloudFlare too. If it's something else, you could report it to GCP via their [Abuse Report Form](https://support.google.com/code/contact/cloud_platform_report?hl=en). However, I understand how this could be tedious. I guess we could keep this issue open and pin it in that case.
flaviut commented 2023-11-02 20:24:36 -04:00 (Migrated from github.com)

Can you configure your firewall to do a reverse DNS lookup on the connecting address?

In my quick testing, I saw discord crawling from 35.227.62.178 and 35.196.132.85 with UA Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com).

dig -x 35.227.62.178 comes up with crawl-35-227-62-178.ptr.discord.com, dig -x 35.196.132.85 comes up with crawl-35-196-132-85.ptr.discord.com.

Can you configure your firewall to do a reverse DNS lookup on the connecting address? In my quick testing, I saw discord crawling from 35.227.62.178 and 35.196.132.85 with UA `Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)`. `dig -x 35.227.62.178` comes up with crawl-35-227-62-178.ptr.discord.com, `dig -x 35.196.132.85` comes up with crawl-35-196-132-85.ptr.discord.com.
DarkDoccieDutch commented 2024-04-11 16:50:05 -04:00 (Migrated from github.com)

Is there any follow up or fix on this subject?

Is there any follow up or fix on this subject?
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PAS/nitter#804
No description provided.