standardnotes / self-hosted

[Legacy] Self-host your own Standard Notes server for end-to-end encrypted notes and files
https://github.com/standardnotes/server
GNU Affero General Public License v3.0
343 stars 39 forks source link

[BUG] Unable to refer images from Imgur #88

Open gxgani opened 1 year ago

gxgani commented 1 year ago
Container                             Repository                        Tag                 Image Id            Size
api-gateway-standalone                standardnotes/api-gateway         latest              a2ce9338c689        149MB
auth-standalone                       standardnotes/auth                latest              53c0b16f1836        162MB
auth-worker-standalone                standardnotes/auth                latest              53c0b16f1836        162MB
cache-standalone                      redis                             6.0-alpine          83c577984741        24.7MB
db-standalone                         mysql                             5.6                 dd3b2a5dcb48        303MB
files-standalone                      standardnotes/files               latest              76461bdfa551        150MB
syncing-server-js-standalone          standardnotes/syncing-server-js   latest              814f2e24f737        161MB
syncing-server-js-worker-standalone   standardnotes/syncing-server-js   latest              814f2e24f737        161MB
workspace-standalone                  standardnotes/workspace           latest              471b8422fc26        159MB
workspace-worker-standalone           standardnotes/workspace           latest              471b8422fc26        159MB

Describe the bug Unable to refer images from imgur, url returns 403 because of the referrer included in the headers

Screenshots image

image

0x111 commented 1 year ago

I don't think this is a bug of standardnotes. This request is initiated by your browser to the imgur servers directly and not through the standardnotes server.

There is nothing we can do if imgur is filtering requests based on the referer. You will probably need to setup some kind of server side proxy that would do the request instead of you (this is not part of standardnotes obviously). You will need to request this image indirectly.

gxgani commented 1 year ago

I don't think this is a bug of standardnotes. This request is initiated by your browser to the imgur servers directly and not through the standardnotes server.

There is nothing we can do if imgur is filtering requests based on the referer. You will probably need to setup some kind of server side proxy that would do the request instead of you (this is not part of standardnotes obviously). You will need to request this image indirectly.

FYI the screenshots were taken from Standardnotes macOS client.

0x111 commented 1 year ago

That is probably a pwa or chrome bundled based on the screenshots, so you would face the same issue as I described sadly😕

gxgani commented 1 year ago

Does that mean I should be redirect this issue to webApp repo?

0x111 commented 1 year ago

I don't think so, as I've already mentioned that, we as in you or me or standardnotes can't change Imgur's referrer filtering setup.

Maybe you could fake the domain from where the Webapp runs on so it is not 127.0.0.1 in the referer or just selfhost the Webapp on a regular domain then it would most likely load the picture.