DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35758>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35758

           Summary: Admin webapp does not save correctly the JDBCRealm XML
                    tag.
           Product: Tomcat 5
           Version: 5.5.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Webapps:Administration
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Hi,

I have a problem when configuring a JDBCRealm from the admin tool.

I use no digest algorithm, so I leave the digest text field in blank, but the
generated server.xml file includes an oughfull:
digest=""
attribute, so Tomcat throws me an exception telling me that it can not find the 
required ("") digest algorithm.

I removed the offending line from server.xml and it works perfectly.

Unfortunatelly, my hosting service only allow me to use the admin app. (As a 
workaround, I included the META-INF/context.xml file with the right tags and it 
worked ok)

How can I tell from the admin app that don't generate the digest attribute?
I already test it with: "No", "NO", "NONE" y "null" but doesn't work.

I checked the source code and the SaveJDBCRealmAction Action class has the 
following code in line 235:

attribute = "digest";
mBServer.setAttribute(roname,
       new Attribute("digest",  rform.getDigest()));

May it be guarded like this?

if ( rform.getDigest() != null && !"".equals(rform.getDigest().trim()) ) {
  attribute = "digest";
  mBServer.setAttribute(roname,
         new Attribute("digest",  rform.getDigest()));
}

Thanks in advance
Gabriel

PS: Didn't check it but it may be worth to look at the code of DataSourceRealm 
since it may have similar problems.-

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to