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

External URL validation is too strict #1068

Closed
1 task done
SyfSchydea opened this issue Nov 1, 2024 · 8 comments · Fixed by #1104
Closed
1 task done

External URL validation is too strict #1068

SyfSchydea opened this issue Nov 1, 2024 · 8 comments · Fixed by #1104
Assignees
Labels
bug Something isn't working confirmed This bug has been reproduced

Comments

@SyfSchydea
Copy link

SyfSchydea commented Nov 1, 2024

Description

My Jellyfin, Radarr and Sonarr are all accessed on http://melorae within my local network. But attempting to enter this in the "External URL" doesn't work because "You must provide a valid URL".

Version

2.0.1

Steps to Reproduce

Settings -> Jellyfin -> External URL
enter any domain without a suffix

Screenshots

No response

Logs

No response

Platform

desktop

Device

PC

Operating System

Ubuntu 24 (server), Windows 10 (client)

Browser

Firefox

Additional Context

No response

Code of Conduct

  • I agree to follow Jellyseerr's Code of Conduct
@SyfSchydea SyfSchydea added awaiting triage This issue needs to be reviewed bug Something isn't working labels Nov 1, 2024
@gauthier-th
Copy link
Collaborator

Then you can just keep this field empty? Jellyseerr will use the internal URL

@SyfSchydea
Copy link
Author

The internal URL is based on the containers' hostnames, which are not the same as the external hostname.

@Fallenbagel
Copy link
Owner

The internal URL is based on the containers' hostnames, which are not the same as the external hostname.

For the time being, you can set it directly on settings.json file

@gauthier-th gauthier-th self-assigned this Nov 6, 2024
@gauthier-th gauthier-th added confirmed This bug has been reproduced and removed awaiting triage This issue needs to be reviewed labels Nov 6, 2024
@gauthier-th
Copy link
Collaborator

It's easy to do a fix for this one, but I'm afraid this would cause less experienced people to fill in wrong values.
@Fallenbagel wdyt?

@Fallenbagel
Copy link
Owner

Fallenbagel commented Nov 6, 2024

It's easy to do a fix for this one, but I'm afraid this would cause less experienced people to fill in wrong values.
@Fallenbagel wdyt?

We could add a stricter validation here where it allows:
http://domain
http://domain.com
http://domain.com:9999
http://domain.com/base
http://domain.com:9999/base
http://x.x.x.x:9999
^etc with ofc protocol check too for http:// https://?

Sounds like regex hell though. We could look into if yup validator allows such a thing

@gauthier-th
Copy link
Collaborator

It's easy to do a fix for this one, but I'm afraid this would cause less experienced people to fill in wrong values.
@Fallenbagel wdyt?

We could add a stricter validation here where it allows: http://domain http://domain.com http://domain.com:9999 http://domain.com/base http://domain.com:9999/base http://x.x.x.x:9999 ^etc with ofc protocol check too for http:// https://?

Sounds like regex hell though. We could look into if yup validator allows such a thing

In this case we can just allow everything starting with http:// or https://?

@Fallenbagel
Copy link
Owner

Fallenbagel commented Nov 6, 2024

It's easy to do a fix for this one, but I'm afraid this would cause less experienced people to fill in wrong values.
@Fallenbagel wdyt?

We could add a stricter validation here where it allows: http://domain http://domain.com http://domain.com:9999 http://domain.com/base http://domain.com:9999/base http://x.x.x.x:9999 ^etc with ofc protocol check too for http:// https://?

Sounds like regex hell though. We could look into if yup validator allows such a thing

In this case we can just allow everything starting with http:// or https://?

Yes and no. What if its http://@hdhskl:!@

@gauthier-th
Copy link
Collaborator

It's easy to do a fix for this one, but I'm afraid this would cause less experienced people to fill in wrong values.
@Fallenbagel wdyt?

We could add a stricter validation here where it allows: http://domain http://domain.com http://domain.com:9999 http://domain.com/base http://domain.com:9999/base http://x.x.x.x:9999 ^etc with ofc protocol check too for http:// https://?
Sounds like regex hell though. We could look into if yup validator allows such a thing

In this case we can just allow everything starting with http:// or https://?

Yes and no. What if its http://@hdhskl:!@

Yes, I mean just a regular URL

gauthier-th added a commit that referenced this issue Nov 15, 2024
Default url validation from the Yup module doesn't allow URLs like "http://custom-host", while it is
a correct value for an external URL.

fix #1068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed This bug has been reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants