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

filter_var + FILTER_VALIDATE_URL mode too restrictive for url parsing #330

Open
tjth opened this issue Jul 12, 2018 · 2 comments
Open

filter_var + FILTER_VALIDATE_URL mode too restrictive for url parsing #330

tjth opened this issue Jul 12, 2018 · 2 comments

Comments

@tjth
Copy link

tjth commented Jul 12, 2018

Using the PHP function filter_var causes some URLs to be marked as invalid. One such example is any URL with an underscore in the subdomain. Please see https://stackoverflow.com/questions/39539468/php-filter-validate-url-not-finding-subdomains-with-underscore.

Suggestion: use parse_url with PHP_URL_HOST.

https://github.com/onelogin/php-saml/blob/master/lib/Saml2/Settings.php

@pitbulk
Copy link
Contributor

pitbulk commented Jul 15, 2018

Based on this, it seems not that simple

@fabpot
Copy link
Contributor

fabpot commented Apr 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants