Only decode path element if it actually is encoded.
This commit is contained in:
		
							parent
							
								
									318964b518
								
							
						
					
					
						commit
						a5b2945065
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -10,7 +10,6 @@ import javax.servlet.*;
 | 
				
			||||||
import javax.servlet.http.*;
 | 
					import javax.servlet.http.*;
 | 
				
			||||||
import java.io.*;
 | 
					import java.io.*;
 | 
				
			||||||
import java.util.*;
 | 
					import java.util.*;
 | 
				
			||||||
import java.net.URLEncoder;
 | 
					 | 
				
			||||||
import java.net.URLDecoder;
 | 
					import java.net.URLDecoder;
 | 
				
			||||||
import helma.framework.*;
 | 
					import helma.framework.*;
 | 
				
			||||||
import helma.util.*;
 | 
					import helma.util.*;
 | 
				
			||||||
| 
						 | 
					@ -490,6 +489,9 @@ public abstract class AbstractServletClient extends HttpServlet {
 | 
				
			||||||
	        continue;
 | 
						        continue;
 | 
				
			||||||
	    if (i > prefixTokens)
 | 
						    if (i > prefixTokens)
 | 
				
			||||||
	        pathbuffer.append ("/");
 | 
						        pathbuffer.append ("/");
 | 
				
			||||||
 | 
						    if (token.indexOf ("+") == -1 && token.indexOf ("%") == -1)
 | 
				
			||||||
 | 
						        pathbuffer.append (token);
 | 
				
			||||||
 | 
						    else
 | 
				
			||||||
	        pathbuffer.append (URLDecoder.decode (token));
 | 
						        pathbuffer.append (URLDecoder.decode (token));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return pathbuffer.toString ();
 | 
						return pathbuffer.toString ();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue