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

URL Decoder not allowing local DNS Names #100

Closed
OttScott opened this issue Apr 17, 2024 · 1 comment
Closed

URL Decoder not allowing local DNS Names #100

OttScott opened this issue Apr 17, 2024 · 1 comment
Labels
enhancement New feature or request relevant Important

Comments

@OttScott
Copy link

I have a variety of locally hosted services on my network that I reach by local DNS names. The existing Distract-Me-Not URL Decoder Regex is not allowing me to enter local DNS names (IE "HTTP://stablediffusion/") as it doesn't have a Top Level Domain ending. DNS Names should resolve to even single words or end with a ".". For examples, the following URLs are not currently allowed in DMN:
stablediffusion
http://stablediffusion
http://stablediffusion:32444
ftp://a.stablediffusion:32444/r/typo/*

A better Regex for URL names is ^(?:(?:https?|ftp)://)?(?:*.)([\w-]+.)[\w-]+(?::\d+)?(?:/[^\s\/])(?:/)?$
This matches a large variety of URL formats to include local paths and ports, as well as optional sub-paths with wildcard support. Feel free to tweak it as necessary.

Your environment

  • version of the extension: 2.8.0
  • which browser and its version: Edge 123.0.2420.97 (Official build) (64-bit)

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working demo.
Open DMN Settings
Select Whitelist
Attempt to add a local dns name URI, IE: http://stablediffusion:32444

Expected behaviour

Tell us what should happen:
URL should be accepted

Actual behaviour

Tell us what happens instead
Error Message "Url is not valid"

@AXeL-dev
Copy link
Owner

This was fixed on release 2.8.1, i will close the issue, please re-open it in case you still reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request relevant Important
Projects
None yet
Development

No branches or pull requests

2 participants