Commit 18918cd2 authored by Matija Obreza's avatar Matija Obreza
Browse files

Upgraded file-repository-ftpserver has improved support for security checks

- Pass User to FtpUser: ftpserver will switch security context to the specified SID
parent e3a37eb8
......@@ -283,12 +283,14 @@ public class FileRepositoryConfig implements InitializingBean {
} else {
lockoutManager.handleSuccessfulLogin(username);"FTP login successful for {}", username);
try {
return getUserByName(username);
} catch (final FtpException e) {
LOG.warn("FTP login failed", e);
throw new AuthenticationFailedException(e.getMessage(), e);
FtpUser ftpUser = new FtpUser(user);
final List<Authority> authorities = new ArrayList<>();
authorities.add(new ConcurrentLoginPermission(10, 0));
authorities.add(new WritePermission());
return ftpUser;
} else if (authentication instanceof AnonymousAuthentication) {
......@@ -47,7 +47,7 @@ log4j.category.liquibase=debug
# Internal Hibernate logging is at ERROR
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment