You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a regression from previous TSD behavior where I was successfully able to configure a connection to my self-hosted Obico server with http://hostname:3334.
To Reproduce
Go to octoprint instance, with fresh installation of Obico plugin
Click "Custom server" radio button, type e.g. http://hostname:3334/, click Continue
Rather than continuing to the next screen, an Invalid server address error appears and the wizard cannot continue.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Linux
Browser: Chrome
Version: 102.0.5005.75
Additional context
The regex you're using for URL validation requires that there's a TLD after the hostname. While this is technically correct, the TLD can be left implicit when resolving hostnames on a local network. A host named host1 for instance, can be resolved with http://host1:3334, although it may sometimes be implicitly routed as e.g. http://host1.local:3334 (I'm a bit fuzzy on this - appending .local appears to work here, but IIRC windows prefers .lan... and users can set their own local network TLD. Confusing).
Which is more permissive and lacks the TLD constraint, bringing the process back to parity with pre-Obico.
The text was updated successfully, but these errors were encountered:
smartin015
changed the title
[BUG] custom server URL validation fails on hostname URLs
[BUG] custom server URL validation fails on URLs lacking TLD
Jun 23, 2022
Describe the bug
There is a regression from previous TSD behavior where I was successfully able to configure a connection to my self-hosted Obico server with
http://hostname:3334
.To Reproduce
http://hostname:3334/
, click ContinueRather than continuing to the next screen, an
Invalid server address
error appears and the wizard cannot continue.Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
The regex you're using for URL validation requires that there's a TLD after the hostname. While this is technically correct, the TLD can be left implicit when resolving hostnames on a local network. A host named
host1
for instance, can be resolved withhttp://host1:3334
, although it may sometimes be implicitly routed as e.g.http://host1.local:3334
(I'm a bit fuzzy on this - appending.local
appears to work here, but IIRC windows prefers.lan
... and users can set their own local network TLD. Confusing).I recommend changing your regex to:
Which is more permissive and lacks the TLD constraint, bringing the process back to parity with pre-Obico.
The text was updated successfully, but these errors were encountered: