This is an automated email from the ASF dual-hosted git repository.

sebbASF pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git


The following commit(s) were added to refs/heads/master by this push:
     new 61e58cff Clarify URL decoding in UrlValidator [skip ci]
61e58cff is described below

commit 61e58cff1d75d6ddb1e2958b8ba0b78ae6f347b0
Author: Sebb <[email protected]>
AuthorDate: Sat Jun 20 07:25:02 2026 +0100

    Clarify URL decoding in UrlValidator [skip ci]
    
    Add comment to clarify URL decoding behavior in UrlValidator.
---
 src/main/java/org/apache/commons/validator/routines/UrlValidator.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/src/main/java/org/apache/commons/validator/routines/UrlValidator.java 
b/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
index 2a2e9fb7..6395f2d9 100644
--- a/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
@@ -489,6 +489,7 @@ public class UrlValidator implements Serializable {
         }
 
         try {
+            // This will convert '+' to space, but that is irrelevant for the 
purpose of validation
             final String decodedPath = URLDecoder.decode(path, 
StandardCharsets.UTF_8.name());
             // Don't omit host otherwise leading path may be taken as host if 
it starts with //
             final URI uri = new URI(null, "localhost", decodedPath, null);

Reply via email to