Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add more allowed images domains for Github #9960

Open
Grille opened this issue May 26, 2024 · 8 comments
Open

[Feature]: Add more allowed images domains for Github #9960

Grille opened this issue May 26, 2024 · 8 comments
Assignees
Labels
feature-request Customer feature request Triaged

Comments

@Grille
Copy link

Grille commented May 26, 2024

Related Problem

I tried to use images I uploaded on a GitHub wiki page in my readme, but the URLs seem not to be accepted.

The one that is already in the alowed domain list that is nearest to what I need is :
https://user-images.githubusercontent.com/...image

But when I drop the image in the wiki, the link I get at first is:
https://github.com/User/Repo/assets/...image

Or if I get the image address again later:
https://private-user-images.githubusercontent.com/...image

Both versions seem to be valid

The Elevator Pitch

Does it make sense to add the following domains to the allowed domain list?

  1. Add https://github.com/...image
    (it sems to be ok for https://gitlab.com)
  2. Add https://private-user-images.githubusercontent.com/...image
    (since it sems to be the default way GitHub now stores these images internally??)

Additional Context and Details

A bit off topic:
I would also be happy if someone could point me to how I upload an image on GitHub as non private?
I sadly found nothing about this.

@Grille Grille added the feature-request Customer feature request label May 26, 2024
@erdembayar
Copy link
Contributor

@Grille
Could please list of all of those image domains?

@lyndaidaii
Could you provide us playbook on how to determine which ones are ok or not?

@lyndaidaii
Copy link
Contributor

lyndaidaii commented May 28, 2024

We do have a playbook for this. @erdembayar

@Grille
Copy link
Author

Grille commented May 30, 2024

@erdembayar

Yea, I tested around a bit, and the link stays public only for a short time, after that the image link can only be opened by the owner.
following the image link on the wiki page gets you a new link by then.

So that makes anything under https://private-user-images.githubusercontent.com/ obviously useless as an image link in a package.

on the other hand, the link you get on upload sems to stays valid indefinitely and forwards to an temporary public https://private-user-images.githubusercontent.com/ link, so these could probably be used in a package.

here an example of such a link:
https://github.com/Grille/RetroLine3D/assets/26384012/a0192c26-a4de-4b94-acc2-4e028eb95151

@erdembayar
Copy link
Contributor

on the other hand, the link you get on upload sems to stays valid indefinitely

What is the sems in this context?

forwards to an temporary public https://private-user-images.githubusercontent.com/ link, so these could probably be used in a package. here an example of such a link:
https://github.com/Grille/RetroLine3D/assets/26384012/a0192c26-a4de-4b94-acc2-4e028eb95151

I still don't understand what is the connection between https://private-user-images.githubusercontent.com/ link and https://github.com/Grille/RetroLine3D/assets/26384012/a0192c26-a4de-4b94-acc2-4e028eb95151

If it's hard to reason or implement, there are several other options already available from GitHub. No sure benefit of adding this one.

@Grille
Copy link
Author

Grille commented May 31, 2024

What is the sems in this context?

"seems" At this point I’m pretty sure, the example link I gave is still accessible (not only by me)

The connection is that if you upload an image on GitHub wiki/readme you get an https://github.com/User/Repo/assets/ image link.

That link doesn’t directly contain the image but forwards to a temporary https://private-user-images.githubusercontent.com/ link.

The first link could be used from NuGet (if NuGet can handle being forwarded).

The second link cannot be used since it’s just a temporary link.

So my proposal at this point is adding https://github.com/ just as https://gitlab.com/ is already added.
To be able to use any images that are under the GitHub domain.

That I mentioned https://private-user-images.githubusercontent.com/ in the beginning, was based on a misunderstanding on my side on what that link actually does, sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Customer feature request Triaged
Projects
None yet
Development

No branches or pull requests

3 participants