You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2006/09/11 03:27:20 UTC
svn commit: r442059 - in /tomcat: container/tc5.5.x/catalina/src/conf/
container/tc5.5.x/webapps/docs/
jasper/tc5.5.x/src/share/org/apache/jasper/compiler/
Author: markt
Date: Sun Sep 10 18:27:19 2006
New Revision: 442059
URL: http://svn.apache.org/viewvc?view=rev&rev=442059
Log:
Fix bug 33407. \$ in template text was treated as quoted even when isELIgnored=true
Modified:
tomcat/container/tc5.5.x/catalina/src/conf/server.xml
tomcat/container/tc5.5.x/catalina/src/conf/tomcat-users.xml
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Generator.java
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Parser.java
Modified: tomcat/container/tc5.5.x/catalina/src/conf/server.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/conf/server.xml?view=diff&rev=442059&r1=442058&r2=442059
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/conf/server.xml (original)
+++ tomcat/container/tc5.5.x/catalina/src/conf/server.xml Sun Sep 10 18:27:19 2006
@@ -90,13 +90,11 @@
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
- <!--
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS" />
- -->
+ clientAuth="false" sslProtocol="TLS" keystoreFile="./conf/.localhost" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
@@ -147,14 +145,14 @@
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
+ <!--
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
+ -->
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
- <!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
- -->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
@@ -183,6 +181,17 @@
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JNDIRealm"
+ connectionURL="ldap://services.dev.local:389"
+ connectionName="cn=Manager,dc=dev,dc=local"
+ connectionPassword="secret"
+ userPattern="cn={0},ou=people,dc=dev,dc=local"
+ roleBase="ou=groups,dc=dev,dc=local"
+ roleName="cn"
+ roleSearch="(uniqueMember={0})" />
-->
<!-- Define the default virtual host
Modified: tomcat/container/tc5.5.x/catalina/src/conf/tomcat-users.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/conf/tomcat-users.xml?view=diff&rev=442059&r1=442058&r2=442059
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/conf/tomcat-users.xml (original)
+++ tomcat/container/tc5.5.x/catalina/src/conf/tomcat-users.xml Sun Sep 10 18:27:19 2006
@@ -1,10 +1,10 @@
-<!--
- NOTE: By default, no user is included in the "manager" role required
- to operate the "/manager" web application. If you wish to use this app,
- you must define such a user - the username and password are arbitrary.
--->
+<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
- <user name="tomcat" password="tomcat" roles="tomcat" />
- <user name="role1" password="tomcat" roles="role1" />
- <user name="both" password="tomcat" roles="tomcat,role1" />
+ <role rolename="tomcat"/>
+ <role rolename="role1"/>
+ <role rolename="manager"/>
+ <role rolename="admin"/>
+ <user username="tomcat" password="tomcat" roles="tomcat"/>
+ <user username="role1" password="tomcat" roles="role1"/>
+ <user username="both" password="tomcat" roles="tomcat,role1,manager,admin"/>
</tomcat-users>
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=442059&r1=442058&r2=442059
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Sep 10 18:27:19 2006
@@ -35,6 +35,10 @@
more non-special characters and then a { character caused an
exception. (markt)
</fix>
+ <fix>
+ <bug>33407</bug>: The string \$ in template text was reduced to $
+ when the isELIgnored page directive was set to true. (markt)
+ </fix>
</changelog>
</subsection>
</section>
@@ -68,7 +72,7 @@
<subsection name="Coyote">
<changelog>
<fix>
- <bug>40418</bug>APR Endpoint socket evaluation (remm)
+ <bug>40418</bug>: APR Endpoint socket evaluation (remm)
</fix>
</changelog>
</subsection>
@@ -81,10 +85,6 @@
</fix>
</changelog>
</subsection>
- <subsection name="Cluster">
- <changelog>
- </changelog>
- </subsection>
</section>
Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Generator.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Generator.java?view=diff&rev=442059&r1=442058&r2=442059
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Generator.java Sun Sep 10 18:27:19 2006
@@ -1886,6 +1886,16 @@
return;
}
+ // Replace marker for \$ sequence with correct sequence
+ if (text.indexOf(Constants.ESC) > 0) {
+ if (pageInfo.isELIgnored()) {
+ text = text.replaceAll(String.valueOf(Constants.ESC), "\\\\\\$");
+ textSize++;
+ } else {
+ text = text.replace(Constants.ESC, '$');
+ }
+ }
+
if (textSize <= 3) {
// Special case small text strings
n.setBeginJavaLine(out.getJavaLine());
Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Parser.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Parser.java?view=diff&rev=442059&r1=442058&r2=442059
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/Parser.java Sun Sep 10 18:27:19 2006
@@ -1423,13 +1423,16 @@
ttext.write('\\');
break;
}
+ // Look for \% or \$
+ // Only recognize \$ if isELIgnored is false, but since it can
+ // be set in a page directive, it cannot be determined yet.
char next = (char)reader.peekChar();
- // Looking for \% or \$
- // TODO: only recognize \$ if isELIgnored is false, but since
- // it can be set in a page directive, it cannot be determined
- // here. Argh!
- if (next == '%' || next == '$') {
+ if (next == '%') {
ch = reader.nextChar();
+ } else if(next == '$') {
+ // Skip the $ and use a hack to flag this sequence
+ reader.nextChar();
+ ch = Constants.ESC;
}
}
ttext.write(ch);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org