mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
Entropy source for Travis
This commit is contained in:
parent
6af7b6fce9
commit
bc94466cf7
@ -4,6 +4,7 @@ language: java
|
|||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get -qq update
|
- sudo apt-get -qq update
|
||||||
- sudo apt-get -y -q install tesseract-ocr tesseract-ocr-fra tesseract-ocr-jpn
|
- sudo apt-get -y -q install tesseract-ocr tesseract-ocr-fra tesseract-ocr-jpn
|
||||||
|
- sudo apt-get install haveged && sudo service haveged start
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- TESSDATA_PREFIX=/usr/share/tesseract-ocr
|
- TESSDATA_PREFIX=/usr/share/tesseract-ocr
|
||||||
|
@ -80,7 +80,7 @@ public class RequestContextFilter implements Filter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
|
||||||
EntityManager em = null;
|
EntityManager em;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
em = EMF.get().createEntityManager();
|
em = EMF.get().createEntityManager();
|
||||||
|
@ -99,7 +99,7 @@ public class UserResource extends BaseResource {
|
|||||||
user.setPassword(password);
|
user.setPassword(password);
|
||||||
user.setEmail(email);
|
user.setEmail(email);
|
||||||
user.setStorageQuota(storageQuota);
|
user.setStorageQuota(storageQuota);
|
||||||
user.setStorageCurrent(0l);
|
user.setStorageCurrent(0L);
|
||||||
try {
|
try {
|
||||||
user.setPrivateKey(EncryptionUtil.generatePrivateKey());
|
user.setPrivateKey(EncryptionUtil.generatePrivateKey());
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
@ -678,7 +678,7 @@ public class UserResource extends BaseResource {
|
|||||||
UserDao userDao = new UserDao();
|
UserDao userDao = new UserDao();
|
||||||
User user = userDao.getActiveByUsername(principal.getName());
|
User user = userDao.getActiveByUsername(principal.getName());
|
||||||
user.setTotpKey(key.getKey());
|
user.setTotpKey(key.getKey());
|
||||||
user = userDao.update(user, principal.getId());
|
userDao.update(user, principal.getId());
|
||||||
|
|
||||||
JsonObjectBuilder response = Json.createObjectBuilder()
|
JsonObjectBuilder response = Json.createObjectBuilder()
|
||||||
.add("secret", key.getKey());
|
.add("secret", key.getKey());
|
||||||
|
Loading…
Reference in New Issue
Block a user