Author: kkolinko Date: Wed Jun 11 13:26:32 2014 New Revision: 1601887 URL: http://svn.apache.org/r1601887 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. Merged r1601886 from tomcat/trunk.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/config/realm.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1601886 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java?rev=1601887&r1=1601886&r2=1601887&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/MemoryRuleSet.java Wed Jun 11 13:26:32 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/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1601887&r1=1601886&r2=1601887&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jun 11 13:26:32 2014 @@ -94,6 +94,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"> @@ -131,16 +138,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> </section> <section name="Tomcat 7.0.54 (violetagg)" rtext="released 2014-05-22"> <subsection name="Catalina"> Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/realm.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/realm.xml?rev=1601887&r1=1601886&r2=1601887&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/config/realm.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/realm.xml Wed Jun 11 13:26:32 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