Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006172 [Resin] major always 07-17-18 01:59 07-20-18 13:53
Reporter waiwong View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.57
Summary 0006172: request parameters not kept immutable
Description Consider the following test.jsp:

<%@ page language="java"%><%
        out.println("values for parameter t (before changin):
");
        for (String s : request.getParameterValues("t")) out.println(s + "
");
        
        // update array got from getParameterValues
        String[] t = request.getParameterValues("t");
        for (int i=0; i<t.length; i++) t[i] += "xx";
        
        out.println("values for parameter t (after changing):
");
        for (String s : request.getParameterValues("t")) out.println(s + "
");
%>

The output with test.jsp?t=123&t=456 is

values for parameter t (before changing):
123
233
values for parameter t (after changing):
123xx
233xx

The middle 2 lines change the array returned from request.getParametersValues(), but request should be kept immutable.
Additional Information Tomcat gives the result as:

values for parameter t (before changing):
123
233
values for parameter t (after changing):
123
233
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
07-17-18 01:59 waiwong New Issue
07-20-18 13:53 ferg Assigned To  => ferg
07-20-18 13:53 ferg Status new => closed
07-20-18 13:53 ferg Resolution open => fixed
07-20-18 13:53 ferg Fixed in Version  => 4.0.58


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker