Issue Details (XML | Word | Printable)

Key: JS1-419
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: Florian Kamke
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jetspeed

[FIX] TurbineUserManagement - encryptPassword() - Stream not flushed

Created: 17/Nov/03 11:36 PM   Updated: 02/Apr/04 06:36 PM
Return to search
Component/s: Security
Affects Version/s: 1.4b4
Fix Version/s: 1.5

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All

Bugzilla Id: 24752


 Description  « Hide
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();

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.