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

Settings: validate public gateway before saving it #1844

Closed
lidel opened this issue Sep 1, 2021 · 0 comments · Fixed by #1846
Closed

Settings: validate public gateway before saving it #1844

lidel opened this issue Sep 1, 2021 · 0 comments · Fixed by #1846
Assignees
Labels
area/screen/settings Issues related to Settings screen exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up

Comments

@lidel
Copy link
Member

lidel commented Sep 1, 2021

Current state

#1834 introduced ability to customize public gateway used for shareable URLs and download via preview screen.
The only validation we do is making sure the entered string is a valid URL.

Proposed improvement

We should validate that the gateway is functional before storing it in localStorage to avoid users breaking their experience by entering an invalid gateway address (typo, server being down, etc).

Note on how to validate

Some gateways may not allow cross-origin requests (CORS), so we can't test them using regular fetch.
Workaround: use Image load instead.<img> tags are not being validated using CORS rules.

Prior art is checkViaImgSrc – can be found here.

@lidel lidel added need/triage Needs initial labeling and prioritization area/screen/settings Issues related to Settings screen exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Sep 1, 2021
@hacdias hacdias self-assigned this Sep 2, 2021
@tinytb tinytb moved this to Done in IP JS (PL EngRes) v2 Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/screen/settings Issues related to Settings screen exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants