Author: kkolinko Date: Wed Jun 11 13:23:18 2014 New Revision: 1601886 URL: http://svn.apache.org/r1601886 Log: Further fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=56606 Update documentation for MemoryRealm. Align MemoryUserRule class (in MemoryRuleSet.java) with MemoryUserCreationFactory class (in MemoryUserDatabase.java) so that "username" attribute is read first.
Modified: tomcat/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/config/realm.xml Modified: tomcat/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java?rev=1601886&r1=1601885&r2=1601886&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java Wed Jun 11 13:23:18 2014 @@ -119,9 +119,9 @@ final class MemoryUserRule extends Rule public void begin(String namespace, String name, Attributes attributes) throws Exception { - String username = attributes.getValue("name"); + String username = attributes.getValue("username"); if (username == null) { - username = attributes.getValue("username"); + username = attributes.getValue("name"); } String password = attributes.getValue("password"); String roles = attributes.getValue("roles"); Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1601886&r1=1601885&r2=1601886&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Jun 11 13:23:18 2014 @@ -135,6 +135,13 @@ supported by a filter or servlet. Patch provided by Romain Manni-Bucau. (violetagg) </fix> + <fix> + <bug>56606</bug>: User entries in <code>tomcat-users.xml</code> file + are recommended to use "username" attribute rather than legacy "name" + attribute. Fix inconsistencies in Windows installer, examples. Update + digester rules and documentation for <code>MemoryRealm</code>. + (markt/kkolinko) + </fix> </changelog> </subsection> <subsection name="Coyote"> @@ -233,16 +240,6 @@ </fix> </changelog> </subsection> - <subsection name="Web applications"> - <changelog> - <fix> - <bug>56606</bug>: Ensure that the new attribute name - <code>username</code> is used in the <code>tomcat-users.xml</code> - examples rather than the old attribute name of <code>user</code>. - (markt) - </fix> - </changelog> - </subsection> <subsection name="Other"> <changelog> <update> Modified: tomcat/trunk/webapps/docs/config/realm.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/realm.xml?rev=1601886&r1=1601885&r2=1601886&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/realm.xml (original) +++ tomcat/trunk/webapps/docs/config/realm.xml Wed Jun 11 13:23:18 2014 @@ -798,8 +798,10 @@ <li>Each <code><user></code> element must have the following attributes: <ul> - <li><strong>name</strong> - Username of this user (must be unique - within this file).</li> + <li><strong>username</strong> - Username of this user (must be unique + within this file).<br/> + For compatibility, it is allowed to use <strong>name</strong> as an + alternative name for this attribute.</li> <li><strong>password</strong> - Password of this user (in clear text).</li> <li><strong>roles</strong> - Comma-delimited list of the role names --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org