mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-22 09:08:01 +01:00
Truncate access address in case it is spoofed
Fixes an exception on inserting too long IP address
This commit is contained in:
parent
ad98e28e4c
commit
edb871661c
@ -57,7 +57,7 @@ public class StoreRequestTransaction extends ThrowawayTransaction {
|
||||
@Override
|
||||
public void prepare(PreparedStatement statement) throws SQLException {
|
||||
statement.setLong(1, timestamp);
|
||||
statement.setString(2, accessAddress);
|
||||
statement.setString(2, StringUtils.truncate(accessAddress, 45));
|
||||
statement.setString(3, method);
|
||||
statement.setString(4, url);
|
||||
statement.setInt(5, responseCode);
|
||||
|
Loading…
Reference in New Issue
Block a user