Changeset 680
- Timestamp:
- 02/26/10 16:54:08 (7 months ago)
- Location:
- trunk/src/com/calenco
- Files:
-
- 2 edited
-
security/SUSecurityManager.java (modified) (2 diffs)
-
transform/PublicationManager.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/calenco/security/SUSecurityManager.java
r675 r680 26 26 import com.calenco.repository.PooledRepoManager; 27 27 import com.calenco.repository.dao.UserDAO; 28 import java.math.BigInteger; 28 29 import java.security.SecureRandom; 29 30 import javax.jcr.PathNotFoundException; … … 68 69 pubuser.setName("Special User Running Publications"); // NOI18N 69 70 SecureRandom rng = new SecureRandom(); 70 byte[] passBytes = new byte[20]; 71 pubPass = new BigInteger(130, rng).toString(36); 72 /*byte[] passBytes = new byte[20]; 71 73 rng.nextBytes(passBytes); 72 pubPass = new String(passBytes); 74 pubPass = new String(passBytes);*/ 73 75 pubuser.setPassword(pubPass); 74 76 pubuser = new UserDAO(session).addOrUpdate(pubuser); -
trunk/src/com/calenco/transform/PublicationManager.java
r674 r680 237 237 238 238 private class InternalAuthenticator extends Authenticator { 239 char[] passwd = SUSecurityManager.getInstance().getPubPass().toCharArray(); 240 239 241 @Override 240 242 protected PasswordAuthentication getPasswordAuthentication() { 241 243 // Special publications user, access to all content, requesting from localhost only 242 String pubPass = SUSecurityManager.getInstance().getPubPass(); 243 return new PasswordAuthentication(User.PUB_USER_EMAIL, pubPass.toCharArray()); 244 return new PasswordAuthentication(User.PUB_USER_EMAIL, passwd); 244 245 } 245 246 }
Note: See TracChangeset
for help on using the changeset viewer.
