# \[Fix/Enhancement\] URI Sanity Check

**URL:** <https://forum.pritunl.com/t/fix-enhancement-uri-sanity-check/2223>\
**Category:** Pritunl VPN\
**Tags:** pritunl-client\
**Created:** [July 23, 2024, 3:52pm UTC](https://forum.pritunl.com/t/fix-enhancement-uri-sanity-check/2223 "2024-07-23T15:52:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cl-bc](https://forum.pritunl.com/user_avatar/forum.pritunl.com/cl-bc/32/684_2.png) [@cl-bc](https://forum.pritunl.com/u/cl-bc)\
**Post date:** [July 23, 2024, 3:52pm UTC](https://forum.pritunl.com/t/fix-enhancement-uri-sanity-check/2223/1 "2024-07-23T15:52:08Z")

</div>

Hello,

When using the Pritunl Client and the option to import profiles using the URI, the input allows for an invalid url.

Specifically, causing an issue with some clumsy copy+pasters, is it allows a URI that starts with " " aka %20. Doing so also changes the “port” to 443 instead of the actual port (not that it would ever connect, but it’s still odd).

` pritunl://vpn.example.com:5056/ku/X4xKFNTZ`

While troubleshooting an import, I noticed in the log:  
`[2024-7-23 11:20:34][ERROR] Request: Client error ssl=true hostname=%20pritunl port=443 method=GET path=//vpn.example.com:5056/ku/X4xKFNTZ ttl=12000`

As a domain should never start with a space, I believe a sanity check should be added to prevent the invalid entry with an error prior to pressing import or prior to closing the import window.
