portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24752] New: - TurbineUserManagement - encryptPassword() - Stream not flushed
Date Mon, 17 Nov 2003 15:37:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24752>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24752

TurbineUserManagement - encryptPassword() - Stream not flushed

           Summary: TurbineUserManagement - encryptPassword() - Stream not
                    flushed
           Product: Jetspeed
           Version: 1.4b4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Security
        AssignedTo: jetspeed-dev@jakarta.apache.org
        ReportedBy: kkf@guso.de


In org.apache.jetspeed.services.security.turbine.TurbineUserManagement
in Method encryptPassword() the OutputStream is not flushed.

The result is that the returned encrypted passwordstring is not complete and i
think it may vary on different systems.


/* CODE from current CVS: */
MessageDigest md = MessageDigest.getInstance(passwordsAlgorithm);
byte[] digest = md.digest(password.getBytes("UTF-8"));
ByteArrayOutputStream bas = new ByteArrayOutputStream(digest.length +
digest.length / 3 + 1);
OutputStream encodedStream = MimeUtility.encode(bas, "base64");
encodedStream.write(digest);
return bas.toString();

/* FIX: */
encodedStream.flush();

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message