diff --git a/CHANGELOG.md b/CHANGELOG.md index 826a9bf2..77a27b26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [v6.14.1](https://github.com/PerimeterX/perimeterx-java-sdk/compare/6.14.1...HEAD) (2024-11-12) +- Fix Telemetry bug when sending page requested activities when telemetry fails +- Fix risk_rtt is not sent when risk call gets s2s_timeout + ## [v6.14.0](https://github.com/PerimeterX/perimeterx-java-sdk/compare/6.14.0...HEAD) (2024-09-15) - Bump Fuzzer version - Support cookie secret rotation diff --git a/README.md b/README.md index c5c711db..aeaf943a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # [PerimeterX](http://www.perimeterx.com) Java SDK -> Latest stable version: [v6.14.0](https://search.maven.org/#artifactdetails%7Ccom.perimeterx%7Cperimeterx-sdk%7C6.15.0%7Cjar) +> Latest stable version: [v6.14.1](https://search.maven.org/#artifactdetails%7Ccom.perimeterx%7Cperimeterx-sdk%7C6.15.0%7Cjar) ## Table of Contents diff --git a/pom.xml b/pom.xml index abe46ab1..61cd299b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ PerimeterX JAVA SDK com.perimeterx perimeterx-sdk - 6.14.0 + 6.14.1 jar PerimeterX Java SDK diff --git a/px_metadata.json b/px_metadata.json index e310ea96..ba6268e9 100644 --- a/px_metadata.json +++ b/px_metadata.json @@ -1,5 +1,5 @@ { - "version": "6.14.0", + "version": "6.14.1", "supported_features": [ "advanced_blocking_response", "bypass_monitor_header", diff --git a/src/main/java/com/perimeterx/api/activities/ActivityHandler.java b/src/main/java/com/perimeterx/api/activities/ActivityHandler.java index ee796ecd..8656a40c 100644 --- a/src/main/java/com/perimeterx/api/activities/ActivityHandler.java +++ b/src/main/java/com/perimeterx/api/activities/ActivityHandler.java @@ -36,7 +36,7 @@ public interface ActivityHandler { * @param context * @throws PXException */ - void handleEnforcerTelemetryActivity(PXConfiguration pxConfig, UpdateReason updateReason, PXContext context) throws PXException; + void handleEnforcerTelemetryActivity(PXConfiguration pxConfig, UpdateReason updateReason, PXContext context); /** * Sends additional server to server activity in case of login request. diff --git a/src/main/java/com/perimeterx/api/activities/BufferedActivityHandler.java b/src/main/java/com/perimeterx/api/activities/BufferedActivityHandler.java index 69c47418..fb6c006e 100644 --- a/src/main/java/com/perimeterx/api/activities/BufferedActivityHandler.java +++ b/src/main/java/com/perimeterx/api/activities/BufferedActivityHandler.java @@ -55,14 +55,13 @@ public void handlePageRequestedActivity(PXContext context) throws PXException { } @Override - public void handleEnforcerTelemetryActivity(PXConfiguration pxConfig, UpdateReason updateReason, PXContext context) throws PXException { + public void handleEnforcerTelemetryActivity(PXConfiguration pxConfig, UpdateReason updateReason, PXContext context) { try { EnforcerTelemetryActivityDetails details = new EnforcerTelemetryActivityDetails(pxConfig, updateReason); EnforcerTelemetry enforcerTelemetry = new EnforcerTelemetry("enforcer_telemetry", pxConfig.getAppId(), details); this.client.sendEnforcerTelemetry(enforcerTelemetry, context); } catch (IOException e) { logger.debug("An error occurred while sending telemetry command"); - throw new PXException(LogReason.ERROR_TELEMETRY_EXCEPTION.toString(), e); } } diff --git a/src/main/java/com/perimeterx/api/activities/DefaultActivityHandler.java b/src/main/java/com/perimeterx/api/activities/DefaultActivityHandler.java index 01dfcf3c..045341d2 100644 --- a/src/main/java/com/perimeterx/api/activities/DefaultActivityHandler.java +++ b/src/main/java/com/perimeterx/api/activities/DefaultActivityHandler.java @@ -46,14 +46,13 @@ public void handlePageRequestedActivity(PXContext context) throws PXException { } @Override - public void handleEnforcerTelemetryActivity(PXConfiguration pxConfiguration, UpdateReason updateReason, PXContext context) throws PXException { + public void handleEnforcerTelemetryActivity(PXConfiguration pxConfiguration, UpdateReason updateReason, PXContext context) { try { EnforcerTelemetryActivityDetails details = new EnforcerTelemetryActivityDetails(pxConfiguration, updateReason); EnforcerTelemetry enforcerTelemetry = new EnforcerTelemetry("enforcer_telemetry", pxConfiguration.getAppId(), details); this.client.sendEnforcerTelemetry(enforcerTelemetry, context); } catch (Exception e) { context.logger.debug("An error occurred while sending telemetry command"); - throw new PXException(LogReason.ERROR_TELEMETRY_EXCEPTION + ". Reason: " + e.getMessage(), e); } } diff --git a/src/main/java/com/perimeterx/api/remoteconfigurations/TimerConfigUpdater.java b/src/main/java/com/perimeterx/api/remoteconfigurations/TimerConfigUpdater.java index dffc518b..263fddb1 100644 --- a/src/main/java/com/perimeterx/api/remoteconfigurations/TimerConfigUpdater.java +++ b/src/main/java/com/perimeterx/api/remoteconfigurations/TimerConfigUpdater.java @@ -34,7 +34,7 @@ public void run() { configManager.updateConfiguration(dynamicConfig); try { activityHandler.handleEnforcerTelemetryActivity(pxConfiguration, UpdateReason.REMOTE_CONFIG, null); - } catch (PXException e) { + } catch (Exception e) { logger.error("Failed to report telemetry, {}", e.getMessage()); } } diff --git a/src/main/java/com/perimeterx/internals/PXS2SValidator.java b/src/main/java/com/perimeterx/internals/PXS2SValidator.java index b47033ab..95ce5d8c 100644 --- a/src/main/java/com/perimeterx/internals/PXS2SValidator.java +++ b/src/main/java/com/perimeterx/internals/PXS2SValidator.java @@ -53,6 +53,7 @@ public boolean verify(PXContext pxContext) { } catch (ConnectTimeoutException e) { // Timeout handling - report pass reason and proceed with request pxContext.setPassReason(PassReason.S2S_TIMEOUT); + pxContext.setRiskRtt(System.currentTimeMillis() - startRiskRtt); return true; } catch (Exception e) { handleS2SError(pxContext, System.currentTimeMillis() - startRiskRtt, response, e); diff --git a/web/pom.xml b/web/pom.xml index a2e8dcc2..2228c520 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -65,7 +65,7 @@ 8 8 - 6.14.0 + 6.14.1