From 0d39e12274e116751b35bc3ca0136261d4903190 Mon Sep 17 00:00:00 2001 From: Tayfun Aydin Date: Mon, 27 May 2019 08:53:57 +0200 Subject: [PATCH] Remove check on device token length --- src/Wrep/Notificato/Apns/Feedback/Tuple.php | 5 ----- src/Wrep/Notificato/Apns/Message.php | 5 ----- 2 files changed, 10 deletions(-) diff --git a/src/Wrep/Notificato/Apns/Feedback/Tuple.php b/src/Wrep/Notificato/Apns/Feedback/Tuple.php index 14e7ab7..d0fcfb1 100644 --- a/src/Wrep/Notificato/Apns/Feedback/Tuple.php +++ b/src/Wrep/Notificato/Apns/Feedback/Tuple.php @@ -40,11 +40,6 @@ public function __construct($invalidatedAtTimestamp, $deviceToken, Certificate $ throw new \InvalidArgumentException('Invalid device token given, no hexadecimal: ' . $deviceToken); } - // Check if the length of the devicetoken is correct - if (64 != strlen($deviceToken)) { - throw new \InvalidArgumentException('Invalid device token given, incorrect length: ' . $deviceToken . ' (' . strlen($deviceToken) . ')'); - } - // Save the data $this->invalidatedAt = new \DateTime('@' . (int)$invalidatedAtTimestamp); $this->deviceToken = $deviceToken; diff --git a/src/Wrep/Notificato/Apns/Message.php b/src/Wrep/Notificato/Apns/Message.php index 0efe1d6..2a91056 100644 --- a/src/Wrep/Notificato/Apns/Message.php +++ b/src/Wrep/Notificato/Apns/Message.php @@ -294,11 +294,6 @@ private function setDeviceToken($deviceToken) throw new \InvalidArgumentException('Invalid device token given, no hexadecimal: ' . $deviceToken); } - // Check if the length of the devicetoken is correct - if (64 != strlen($deviceToken)) { - throw new \InvalidArgumentException('Invalid device token given, incorrect length: ' . $deviceToken . ' (' . strlen($deviceToken) . ')'); - } - // Set the devicetoken $this->deviceToken = $deviceToken; }