diff --git a/powerauth-restful-security-spring-annotation/src/main/java/io/getlime/security/powerauth/rest/api/spring/provider/PowerAuthEncryptionProviderBase.java b/powerauth-restful-security-spring-annotation/src/main/java/io/getlime/security/powerauth/rest/api/spring/provider/PowerAuthEncryptionProviderBase.java index 0760b73e..04b100b4 100644 --- a/powerauth-restful-security-spring-annotation/src/main/java/io/getlime/security/powerauth/rest/api/spring/provider/PowerAuthEncryptionProviderBase.java +++ b/powerauth-restful-security-spring-annotation/src/main/java/io/getlime/security/powerauth/rest/api/spring/provider/PowerAuthEncryptionProviderBase.java @@ -123,6 +123,11 @@ public abstract class PowerAuthEncryptionProviderBase { throw new PowerAuthEncryptionException(); } + if (eciesRequest == null) { + logger.warn("Deserialization of request body bytes resulted in null value."); + throw new PowerAuthEncryptionException(); + } + // Prepare ephemeral public key final String ephemeralPublicKey = eciesRequest.getEphemeralPublicKey(); final String encryptedData = eciesRequest.getEncryptedData();