This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Validator
Fabien Potencier 9ed8d576e1 bug #20102 [Validator] Url validator not validating hosts ending in a number (gwkunze)
This PR was squashed before being merged into the 2.7 branch (closes #20102).

Discussion
----------

[Validator] Url validator not validating hosts ending in a number

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (Should validate slightly more urls)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | None that I could find
| License       | MIT
| Doc PR        |

We ran into an issue where the URL validator wasn't validating URL that we got from a legitimate (intranet) URL. Afaict from skimming RFCs the URL `http://myhost123/` is valid, however the current regular expression doesn't accept the last part of a hostname (in this case the entire hostname is the last part as there are no periods in the host).

I've fixed this by adding the numbers unicode character property to the regular expression, I'm not sure but symbol characters (`\pS`) might need to be added to the group as well.

Commits
-------

934c434 [Validator] Url validator not validating hosts ending in a number
2016-10-03 09:05:36 -07:00
..
Constraints [Validator] Url validator not validating hosts ending in a number 2016-10-03 09:05:35 -07:00
Context removed @since 2016-07-04 07:27:33 +02:00
Exception removed @since 2016-07-04 07:27:33 +02:00
Mapping fixed CS 2016-09-30 12:35:09 -07:00
Resources/translations Security and validators messages translation to Latvian 2016-09-22 19:04:04 +03:00
Tests bug #20102 [Validator] Url validator not validating hosts ending in a number (gwkunze) 2016-10-03 09:05:36 -07:00
Util removed @since 2016-07-04 07:27:33 +02:00
Validator removed @since 2016-07-04 07:27:33 +02:00
Violation removed @since 2016-07-04 07:27:33 +02:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [Validator] Deprecated PHP7-incompatible constraints and related validators 2015-05-15 12:10:43 +02:00
ClassBasedInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
composer.json Fix PHP 7.1 related failures 2016-07-19 10:44:18 +02:00
Constraint.php reset constraint options 2016-10-01 21:36:38 +00:00
ConstraintValidator.php Merge branch '2.3' into 2.7 2016-03-16 17:00:15 +01:00
ConstraintValidatorFactory.php Merge branch '2.4' 2014-04-16 10:08:40 +02:00
ConstraintValidatorFactoryInterface.php removed unneeded use statements 2014-01-01 08:52:14 +01:00
ConstraintValidatorInterface.php remove api tags from code 2015-09-28 19:11:22 +02:00
ConstraintViolation.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ConstraintViolationInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ConstraintViolationList.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ConstraintViolationListInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
DefaultTranslator.php Silence invasive deprecation warnings, opt-in for warnings 2015-06-08 10:37:21 +01:00
ExecutionContext.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ExecutionContextInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
GlobalExecutionContextInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
GroupSequenceProviderInterface.php
LICENSE Update copyright year 2016-01-01 23:53:47 -03:00
MetadataFactoryInterface.php Normalized @deprecated annotations. 2015-01-05 16:02:26 +01:00
MetadataInterface.php Normalized @deprecated annotations. 2015-01-05 16:02:26 +01:00
ObjectInitializerInterface.php remove api tags from code 2015-09-28 19:11:22 +02:00
phpunit.xml.dist Add missing exclusions from phpunit.xml.dist 2015-11-18 09:19:46 +01:00
PropertyMetadataContainerInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
PropertyMetadataInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
README.md Updated all the README files 2016-03-04 08:12:06 +01:00
Validation.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ValidationVisitor.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ValidationVisitorInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
Validator.php Silence invasive deprecation warnings, opt-in for warnings 2015-06-08 10:37:21 +01:00
ValidatorBuilder.php Silence invasive deprecation warnings, opt-in for warnings 2015-06-08 10:37:21 +01:00
ValidatorBuilderInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
ValidatorInterface.php removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00

Validator Component

The Validator component provides tools to validate values following the JSR-303 Bean Validation specification.

Resources