W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/src/org/w3c/unicorn/input URIInputParameter.java,1.14,1.15

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 09 Oct 2009 14:59:40 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MwGwW-0004pH-QW@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/input
In directory hutz:/tmp/cvs-serv18536/src/org/w3c/unicorn/input

Modified Files:
	URIInputParameter.java 
Log Message:
throws empty exception if the uri is "referer". 

Index: URIInputParameter.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/input/URIInputParameter.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- URIInputParameter.java	7 Oct 2009 12:48:38 -0000	1.14
+++ URIInputParameter.java	9 Oct 2009 14:59:38 -0000	1.15
@@ -39,6 +39,9 @@
 			if (uri == null || uri.equals(""))
 				throw new UnicornException(Message.ERROR, "$message_empty_uri");
 			
+			if (uri.equals("referer"))
+				throw new UnicornException();
+			
 			Pattern urlPattern = Pattern.compile("^(https?)://([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)*(:(\\d+))?([/#]\\p{ASCII}*)?", Pattern.CASE_INSENSITIVE);
 			if (!urlPattern.matcher(uri).matches()) {
 				if (!uri.contains("://")) 
Received on Friday, 9 October 2009 15:11:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC