Bug 54054 - 2 CGIServlet's with different Parameter passShellEnvironment
2 CGIServlet's with different Parameter passShellEnvironment
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
6.0.36
PC Linux
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-10-26 07:24 UTC by Claus Rieber
Modified: 2012-12-06 13:48 UTC (History)
0 users



Attachments
2 webapps test1/test2. (1.30 KB, application/x-gzip)
2012-10-26 07:24 UTC, Claus Rieber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claus Rieber 2012-10-26 07:24:33 UTC
Created attachment 29511 [details]
2 webapps test1/test2.

I'm running Tomcat 6.0.36 with Java 1.6.0_32 on Ubuntu 12.04 (64 Bit).

I have 2 webapps test1 and test2 which use CGI with CGIServlet.
The difference between test1 and test2 is the Parameter passShellEnvironment.
test1 sets it to true, test2 to false.
When I call .../cgi-bin/getenv.pl, both apps show the complete environment.
I searched the source of CGIServlet and found, that there is a static 
Hashtable: 
static Hashtable<String,String> shellEnv = new Hashtable<String,String>();

So test1 sets this Hashtable and test2 has it too.
I suggest to remove the static.
Then only test1 has the environment.

In Tomcat 7.0.32 the problem is the same.
Comment 1 Mark Thomas 2012-10-26 20:04:30 UTC
Marking as a bug rather than an enhancement.

Fixed in trunk and 7.0.x and will be in 7.0.33 onwards.

Proposed for 6.0.x.
Comment 2 Konstantin Kolinko 2012-12-06 13:48:23 UTC
Fixed in 6.0 with r1417882 , will be in 6.0.37 onwards.