jericho 2003/01/24 05:49:43
Modified: src/util/org/apache/util URI.java
Log:
Fix a bug not to validate the escaped rel_path correctly...
Reported by Armando_Anton <[EMAIL PROTECTED]>
Revision Changes Path
1.27 +7 -6 jakarta-slide/src/util/org/apache/util/URI.java
Index: URI.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/util/org/apache/util/URI.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- URI.java 22 Jan 2003 13:50:08 -0000 1.26
+++ URI.java 24 Jan 2003 13:49:43 -0000 1.27
@@ -2684,8 +2684,9 @@
int at = indexFirstOf(escapedPath, '/');
if (at == 0)
throw new URIException(URIException.PARSING, "incorrect path");
- if (at > 0 && !validate(escapedPath, 0, at, rel_segment) ||
- at < 0 && !validate(escapedPath, 0, -1, abs_path))
+ if (at > 0 && !validate(escapedPath, 0, at - 1, rel_segment) &&
+ !validate(escapedPath, at, -1, abs_path) ||
+ at < 0 && !validate(escapedPath, 0, -1, rel_segment))
throw new URIException(URIException.ESCAPING,
"escaped relative path not valid");
_path = escapedPath;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>