SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.83k stars 94 forks source link

Links generated by the "open in browser" function aren't accepted by the CDN #518

Closed bendi-github closed 5 months ago

bendi-github commented 5 months ago

Acknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

28.2.1

Application version

4.7.1

Bug description

When trying to open images in the browser via the "open in browser" function, the discord CDN replies with "This content is no longer available". The expected outcome is that the image is shown in the browser. This also happens when image previews are turned off and the files are clicked to view them in the browser.

Performing the steps mentioned above via the discord.com webpage produces the expected result.

Additional context

While trying to troubleshoot this issue, I came across this reddit post explaining url parameters attached to cdn urls. URLs generated by Webcord do not contain these parameters.

bendi-github commented 5 months ago

Link generated by WebCord: https://cdn.discordapp.com/attachments/431195276884181012/1206220713783201842/image.png Link generated by Discord opened in Firefox: https://cdn.discordapp.com/attachments/431195276884181012/1206220713783201842/image.png?ex=65db3794&is=65c8c294&hm=068979a35d5b58ab36a8c017456bde777ba9067f0c0412d415e51c285b0dcd85&

SpacingBat3 commented 5 months ago

Resolved in 294987d.