diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index cce3710d..98f0c89d 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -12,6 +12,6 @@ assignees: '' # # There's a better way to get help! # -# Send your questions or issues to sdksupport@yoti.com +# Send your questions or issues to https://support.yoti.com # # diff --git a/README.md b/README.md index 57594652..baf6ffee 100755 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The Yoti SDK can be used for the following products, follow the links for more i ## Support -For any questions or support please email [clientsupport@yoti.com](mailto:clientsupport@yoti.com). +For any questions or support please contact us here: https://support.yoti.com Please provide the following to get you up and working as quickly as possible: * Computer type diff --git a/composer.json b/composer.json index 602c2179..46af649a 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "yoti/yoti-php-sdk", "description": "Yoti SDK for quickly integrating your PHP backend with Yoti", - "version": "4.2.0", + "version": "4.2.2", "keywords": [ "yoti", "sdk" diff --git a/src/Constants.php b/src/Constants.php index f784e2ec..300def72 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -25,7 +25,7 @@ class Constants public const SDK_IDENTIFIER = 'PHP'; /** Default SDK version */ - public const SDK_VERSION = '4.2.0'; + public const SDK_VERSION = '4.2.2'; /** Base url for connect page (user will be redirected to this page eg. baseurl/app-id) */ public const CONNECT_BASE_URL = 'https://www.yoti.com/connect'; diff --git a/src/Profile/Util/Attribute/AnchorConverter.php b/src/Profile/Util/Attribute/AnchorConverter.php index 89558202..33e6fb57 100644 --- a/src/Profile/Util/Attribute/AnchorConverter.php +++ b/src/Profile/Util/Attribute/AnchorConverter.php @@ -115,7 +115,7 @@ private static function convertCertToX509(string $certificate): \stdClass } }); - $decodedX509Data = Json::decode(Json::encode($X509Data), false); + $decodedX509Data = Json::decode(Json::encode(Json::convert_from_latin1_to_utf8_recursively($X509Data)), false); // Ensure serial number is cast to string. // @see \phpseclib\Math\BigInteger::__toString() diff --git a/src/Util/Json.php b/src/Util/Json.php index cdeeefd9..e014e174 100644 --- a/src/Util/Json.php +++ b/src/Util/Json.php @@ -55,4 +55,22 @@ private static function validate(): void throw new JsonException(json_last_error_msg(), json_last_error()); } } + + public static function convert_from_latin1_to_utf8_recursively($dat) + { + if (is_string($dat)) { + return utf8_encode($dat); + } elseif (is_array($dat)) { + $ret = []; + foreach ($dat as $i => $d) $ret[ $i ] = self::convert_from_latin1_to_utf8_recursively($d); + + return $ret; + } elseif (is_object($dat)) { + foreach ($dat as $i => $d) $dat->$i = self::convert_from_latin1_to_utf8_recursively($d); + + return $dat; + } else { + return $dat; + } + } }