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

ipv6 value is not valid url #845

Closed
4 tasks done
ido156012 opened this issue Apr 21, 2023 · 9 comments · Fixed by #864
Closed
4 tasks done

ipv6 value is not valid url #845

ido156012 opened this issue Apr 21, 2023 · 9 comments · Fixed by #864
Assignees
Labels
🐛 Bug Something isn't working

Comments

@ido156012
Copy link

Environment

Docker

Version

0.12.0

Describe the problem

when trying to use an ipv6 address enclosed in square brackets for an app, homarr displays "value is not valid url" and prevents saving.

currently makes app links unusable for ipv6 only networks without a dns server.

Logs

relevant?

Context

for example:
value is not valid url

Please tick the boxes

  • I confirm that I attached the proper logs
  • I've read the docs
  • I've checked for duplicate issues
  • I've tried to debug myself
@ido156012 ido156012 added the 🐛 Bug Something isn't working label Apr 21, 2023
@manuel-rw manuel-rw self-assigned this Apr 22, 2023
@manuel-rw
Copy link
Collaborator

Hi, can you quickly help me out with this issue?

  1. Go to https://regex101.com/ and enter the following regex at the top:
(https?:\/\/(?:www.|(?!www))\[+[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9].[^\\s]{2,}|www.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9].[^\\s]{2,}|https?:\/\/(?:www.|(?!www))[a-zA-Z0-9]+.[^\\s]{2,}|www.[a-zA-Z0-9]+.[^\\s]{2,})
  1. Copy your IPv6 and paste it to the big input field below the regex. Does it get colored green?

Note: This does not expose your IPv6. I just want to confirm that I made the correct changes to the code.

@ido156012
Copy link
Author

nope, does not get colored green

image

@manuel-rw
Copy link
Collaborator

Okay, thanks for checking. Is there something like eth0 in the censored part?
Or just numbers and characters?

@ido156012
Copy link
Author

No, just numbers, lowercase characters and :

@manuel-rw
Copy link
Collaborator

Okay, thanks. I'll have to revise my code. I'll contact you again when I have news

@ajnart
Copy link
Owner

ajnart commented Apr 26, 2023

@manuel-rw we could just add a “I know what I’m doing” button that disables input validation, that would work too. But I’m not sure how well IPV6 Is supported with the rest of the app

@manuel-rw
Copy link
Collaborator

manuel-rw commented Apr 26, 2023

@manuel-rw we could just add a “I know what I’m doing” button that disables input validation, that would work too. But I’m not sure how well IPV6 Is supported with the rest of the app

Bad Idea :D

@ido156012 can you re-try with

(https?:\/\/(?:www.|(?!www))\[?[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\]?.[^\\s]{2,}|www.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9].[^\\s]{2,}|https?:\/\/(?:www.|(?!www))\[?[a-zA-Z0-9]+\]?.[^\\s]{2,}|www.[a-zA-Z0-9]+.[^\\s]{2,})

This random example address worked for me:

image

@ido156012
Copy link
Author

we have a winner!

image

@manuel-rw
Copy link
Collaborator

Awesome!
I'll open a PR. Thanks for the help :)

@manuel-rw manuel-rw linked a pull request Apr 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants