tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/session SessionIdGenerator.java
Date Sat, 13 Oct 2001 04:25:26 GMT
costin      01/10/12 21:25:26

  Modified:    src/share/org/apache/tomcat/modules/session
                        SessionIdGenerator.java
  Log:
  Just to be safe, same fixes as in 4114.
  It may happen if a servlet calls a jsp which get a new session id. There are no
  other place where we doPriviledged in normal code.
  
  Revision  Changes    Path
  1.7       +7 -1      jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionIdGenerator.java
  
  Index: SessionIdGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionIdGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SessionIdGenerator.java	2001/09/07 04:52:18	1.6
  +++ SessionIdGenerator.java	2001/10/13 04:25:26	1.7
  @@ -153,10 +153,16 @@
   
       //--------------------  Tomcat context events --------------------
   
  +    private Object accessControlContext=null;
   
       /** Init session management stuff for this context. 
        */
       public void engineInit(ContextManager cm) throws TomcatException {
  +	try {
  +	    accessControlContext=jdk11Compat.getAccessControlContext();
  +	} catch(Exception ex) {
  +	    ex.printStackTrace();// shouldn't happen
  +	}
       }
       
   
  @@ -178,7 +184,7 @@
   	// We're in a sandbox...
   	PriviledgedIdGenerator di = new PriviledgedIdGenerator(this, jsIdent);
   	try {
  -	    newId= (String)jdk11Compat.doPrivileged(di, jdk11Compat.getAccessControlContext());
  +	    newId= (String)jdk11Compat.doPrivileged(di, accessControlContext);
   	} catch( Exception ex ) {
   	    newId=null;
   	}
  
  
  

Mime
View raw message