mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
Closes #469: make sure the IP sent by the forward proxy is not bigger than 45 chars
This commit is contained in:
parent
2a4274d583
commit
7205863d95
@ -366,7 +366,7 @@ public class UserResource extends BaseResource {
|
||||
AuthenticationToken authenticationToken = new AuthenticationToken()
|
||||
.setUserId(user.getId())
|
||||
.setLongLasted(longLasted)
|
||||
.setIp(ip)
|
||||
.setIp(StringUtils.abbreviate(ip, 45))
|
||||
.setUserAgent(StringUtils.abbreviate(request.getHeader("user-agent"), 1000));
|
||||
String token = authenticationTokenDao.create(authenticationToken);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user