Jelajahi Sumber

Merge branch 'master' of https://github.com/unaio/una

AntonLV 1 tahun lalu
induk
melakukan
c9f4a40e12

+ 80 - 79
composer.lock

@@ -22,12 +22,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/akeeba/s3.git",
-                "reference": "deeafb9e3f041c3ce851cd6abbe0fb30e6e4060d"
+                "reference": "f4f20122476b27ffa243f8a49aeaf7813cbc8932"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/akeeba/s3/zipball/deeafb9e3f041c3ce851cd6abbe0fb30e6e4060d",
-                "reference": "deeafb9e3f041c3ce851cd6abbe0fb30e6e4060d",
+                "url": "https://api.github.com/repos/akeeba/s3/zipball/f4f20122476b27ffa243f8a49aeaf7813cbc8932",
+                "reference": "f4f20122476b27ffa243f8a49aeaf7813cbc8932",
                 "shasum": ""
             },
             "require": {
@@ -66,7 +66,7 @@
                 "issues": "https://github.com/akeeba/s3/issues",
                 "source": "https://github.com/akeeba/s3/tree/development"
             },
-            "time": "2024-11-27T19:13:33+00:00"
+            "time": "2025-01-06T14:29:07+00:00"
         },
         {
             "name": "avto-dev/composer-cleanup-plugin",
@@ -153,16 +153,16 @@
         },
         {
             "name": "bshaffer/oauth2-server-php",
-            "version": "v1.14.1",
+            "version": "v1.14.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/bshaffer/oauth2-server-php.git",
-                "reference": "096db2c86a7d67a2ba45e72be7d208c342694542"
+                "reference": "1c715c2d2f71254d1c683b8c89a0f16b61ccd0d6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/096db2c86a7d67a2ba45e72be7d208c342694542",
-                "reference": "096db2c86a7d67a2ba45e72be7d208c342694542",
+                "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/1c715c2d2f71254d1c683b8c89a0f16b61ccd0d6",
+                "reference": "1c715c2d2f71254d1c683b8c89a0f16b61ccd0d6",
                 "shasum": ""
             },
             "require": {
@@ -209,22 +209,22 @@
             ],
             "support": {
                 "issues": "https://github.com/bshaffer/oauth2-server-php/issues",
-                "source": "https://github.com/bshaffer/oauth2-server-php/tree/v1.14.1"
+                "source": "https://github.com/bshaffer/oauth2-server-php/tree/v1.14.2"
             },
-            "time": "2023-07-07T17:53:54+00:00"
+            "time": "2025-03-28T21:13:45+00:00"
         },
         {
             "name": "chargebee/chargebee-php",
-            "version": "v3.37.0",
+            "version": "v3.41.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/chargebee/chargebee-php.git",
-                "reference": "11b3d9407ed9886fee49fdda072200e62053ecc3"
+                "reference": "6a5c12589a4625b9c67e30af6df6140521c3b57e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/11b3d9407ed9886fee49fdda072200e62053ecc3",
-                "reference": "11b3d9407ed9886fee49fdda072200e62053ecc3",
+                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/6a5c12589a4625b9c67e30af6df6140521c3b57e",
+                "reference": "6a5c12589a4625b9c67e30af6df6140521c3b57e",
                 "shasum": ""
             },
             "require": {
@@ -258,9 +258,9 @@
             ],
             "support": {
                 "issues": "https://github.com/chargebee/chargebee-php/issues",
-                "source": "https://github.com/chargebee/chargebee-php/tree/v3.37.0"
+                "source": "https://github.com/chargebee/chargebee-php/tree/v3.41.0"
             },
-            "time": "2024-11-27T10:26:57+00:00"
+            "time": "2025-03-19T04:44:50+00:00"
         },
         {
             "name": "curl/cacert",
@@ -277,12 +277,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/erusev/parsedown.git",
-                "reference": "999fcf788675b65b5344e2744443fc4d5f76cc14"
+                "reference": "c9dc49f68f7bd14e5aa107d86a08ce59203f02ee"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/erusev/parsedown/zipball/999fcf788675b65b5344e2744443fc4d5f76cc14",
-                "reference": "999fcf788675b65b5344e2744443fc4d5f76cc14",
+                "url": "https://api.github.com/repos/erusev/parsedown/zipball/c9dc49f68f7bd14e5aa107d86a08ce59203f02ee",
+                "reference": "c9dc49f68f7bd14e5aa107d86a08ce59203f02ee",
                 "shasum": ""
             },
             "require": {
@@ -320,7 +320,7 @@
                 "issues": "https://github.com/erusev/parsedown/issues",
                 "source": "https://github.com/erusev/parsedown/tree/master"
             },
-            "time": "2024-11-10T07:39:46+00:00"
+            "time": "2024-12-01T16:36:17+00:00"
         },
         {
             "name": "ezyang/htmlpurifier",
@@ -394,16 +394,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "7.9.2",
+            "version": "7.9.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
+                "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
-                "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
+                "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
                 "shasum": ""
             },
             "require": {
@@ -500,7 +500,7 @@
             ],
             "support": {
                 "issues": "https://github.com/guzzle/guzzle/issues",
-                "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
+                "source": "https://github.com/guzzle/guzzle/tree/7.9.3"
             },
             "funding": [
                 {
@@ -516,20 +516,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-07-24T11:22:20+00:00"
+            "time": "2025-03-27T13:37:11+00:00"
         },
         {
             "name": "guzzlehttp/promises",
-            "version": "2.0.4",
+            "version": "2.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
+                "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
-                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c",
+                "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c",
                 "shasum": ""
             },
             "require": {
@@ -583,7 +583,7 @@
             ],
             "support": {
                 "issues": "https://github.com/guzzle/promises/issues",
-                "source": "https://github.com/guzzle/promises/tree/2.0.4"
+                "source": "https://github.com/guzzle/promises/tree/2.2.0"
             },
             "funding": [
                 {
@@ -599,20 +599,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-10-17T10:06:22+00:00"
+            "time": "2025-03-27T13:27:01+00:00"
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "2.7.0",
+            "version": "2.7.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
+                "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
-                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16",
+                "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16",
                 "shasum": ""
             },
             "require": {
@@ -699,7 +699,7 @@
             ],
             "support": {
                 "issues": "https://github.com/guzzle/psr7/issues",
-                "source": "https://github.com/guzzle/psr7/tree/2.7.0"
+                "source": "https://github.com/guzzle/psr7/tree/2.7.1"
             },
             "funding": [
                 {
@@ -715,7 +715,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-07-18T11:15:46+00:00"
+            "time": "2025-03-27T12:30:47+00:00"
         },
         {
             "name": "intervention/image",
@@ -998,16 +998,16 @@
         },
         {
             "name": "mpratt/embera",
-            "version": "2.0.41",
+            "version": "2.0.42",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mpratt/Embera.git",
-                "reference": "069305b9252a428ba4ae6eb58d3dc8c6d9be5cd0"
+                "reference": "afa728339c6f078c803c9277a5054ca241b3c469"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mpratt/Embera/zipball/069305b9252a428ba4ae6eb58d3dc8c6d9be5cd0",
-                "reference": "069305b9252a428ba4ae6eb58d3dc8c6d9be5cd0",
+                "url": "https://api.github.com/repos/mpratt/Embera/zipball/afa728339c6f078c803c9277a5054ca241b3c469",
+                "reference": "afa728339c6f078c803c9277a5054ca241b3c469",
                 "shasum": ""
             },
             "require": {
@@ -1016,7 +1016,8 @@
             },
             "require-dev": {
                 "phpstan/phpstan": "^1.4",
-                "phpunit/phpunit": "^9.0"
+                "phpunit/phpunit": "^9.0||^10.0",
+                "symfony/yaml": "^2.1"
             },
             "suggest": {
                 "ext-curl": "Fetch data using curl instead of using file_get_contents"
@@ -1056,7 +1057,7 @@
             ],
             "support": {
                 "issues": "https://github.com/mpratt/Embera/issues",
-                "source": "https://github.com/mpratt/Embera/tree/2.0.41"
+                "source": "https://github.com/mpratt/Embera/tree/2.0.42"
             },
             "funding": [
                 {
@@ -1064,7 +1065,7 @@
                     "type": "paypal"
                 }
             ],
-            "time": "2024-08-17T04:27:29+00:00"
+            "time": "2025-01-04T06:07:59+00:00"
         },
         {
             "name": "paragonie/sodium_compat",
@@ -1546,16 +1547,16 @@
         },
         {
             "name": "pusher/pusher-php-server",
-            "version": "7.2.6",
+            "version": "7.2.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/pusher/pusher-http-php.git",
-                "reference": "d89e9997191d18fb0fe03a956fa3ccfe0af524ea"
+                "reference": "148b0b5100d000ed57195acdf548a2b1b38ee3f7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/pusher/pusher-http-php/zipball/d89e9997191d18fb0fe03a956fa3ccfe0af524ea",
-                "reference": "d89e9997191d18fb0fe03a956fa3ccfe0af524ea",
+                "url": "https://api.github.com/repos/pusher/pusher-http-php/zipball/148b0b5100d000ed57195acdf548a2b1b38ee3f7",
+                "reference": "148b0b5100d000ed57195acdf548a2b1b38ee3f7",
                 "shasum": ""
             },
             "require": {
@@ -1601,9 +1602,9 @@
             ],
             "support": {
                 "issues": "https://github.com/pusher/pusher-http-php/issues",
-                "source": "https://github.com/pusher/pusher-http-php/tree/7.2.6"
+                "source": "https://github.com/pusher/pusher-http-php/tree/7.2.7"
             },
-            "time": "2024-10-18T12:04:31+00:00"
+            "time": "2025-01-06T10:56:20+00:00"
         },
         {
             "name": "ralouphie/getallheaders",
@@ -1704,26 +1705,26 @@
         },
         {
             "name": "spatie/calendar-links",
-            "version": "1.11.0",
+            "version": "1.11.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/spatie/calendar-links.git",
-                "reference": "da41e7edae84859d3d598b0b3ce3233c843c3e46"
+                "reference": "bf4645d6a2d8eb32248a5b0b7da7976a13e5e2b5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/spatie/calendar-links/zipball/da41e7edae84859d3d598b0b3ce3233c843c3e46",
-                "reference": "da41e7edae84859d3d598b0b3ce3233c843c3e46",
+                "url": "https://api.github.com/repos/spatie/calendar-links/zipball/bf4645d6a2d8eb32248a5b0b7da7976a13e5e2b5",
+                "reference": "bf4645d6a2d8eb32248a5b0b7da7976a13e5e2b5",
                 "shasum": ""
             },
             "require": {
                 "php": "^8.1"
             },
             "require-dev": {
-                "friendsofphp/php-cs-fixer": "^3.48",
-                "phpunit/phpunit": "^10.1",
+                "friendsofphp/php-cs-fixer": "^3.49",
+                "phpunit/phpunit": "^10.5",
                 "spatie/phpunit-snapshot-assertions": "^5.1",
-                "vimeo/psalm": "^5.20"
+                "vimeo/psalm": "^5.22"
             },
             "type": "library",
             "autoload": {
@@ -1751,7 +1752,7 @@
             ],
             "support": {
                 "issues": "https://github.com/spatie/calendar-links/issues",
-                "source": "https://github.com/spatie/calendar-links/tree/1.11.0"
+                "source": "https://github.com/spatie/calendar-links/tree/1.11.1"
             },
             "funding": [
                 {
@@ -1759,7 +1760,7 @@
                     "type": "custom"
                 }
             ],
-            "time": "2024-02-19T05:59:13+00:00"
+            "time": "2025-01-16T16:49:47+00:00"
         },
         {
             "name": "stripe/stripe-php",
@@ -1840,12 +1841,12 @@
             },
             "type": "library",
             "extra": {
+                "thanks": {
+                    "url": "https://github.com/symfony/contracts",
+                    "name": "symfony/contracts"
+                },
                 "branch-alias": {
                     "dev-main": "3.5-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -1930,16 +1931,16 @@
         },
         {
             "name": "twilio/sdk",
-            "version": "8.3.8",
+            "version": "8.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/twilio/twilio-php.git",
-                "reference": "d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326"
+                "reference": "637358562caf326883f2ad0ed77c487bc6f2cdc9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/twilio/twilio-php/zipball/d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326",
-                "reference": "d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326",
+                "url": "https://api.github.com/repos/twilio/twilio-php/zipball/637358562caf326883f2ad0ed77c487bc6f2cdc9",
+                "reference": "637358562caf326883f2ad0ed77c487bc6f2cdc9",
                 "shasum": ""
             },
             "require": {
@@ -1977,9 +1978,9 @@
             ],
             "support": {
                 "issues": "https://github.com/twilio/twilio-php/issues",
-                "source": "https://github.com/twilio/twilio-php/tree/8.3.8"
+                "source": "https://github.com/twilio/twilio-php/tree/8.4.1"
             },
-            "time": "2024-11-15T07:19:40+00:00"
+            "time": "2025-03-20T10:30:10+00:00"
         },
         {
             "name": "unaio/amazon-s3-php-class-hmac-v2",
@@ -1993,28 +1994,28 @@
         },
         {
             "name": "wikimedia/less.php",
-            "version": "v5.1.2",
+            "version": "v5.2.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/wikimedia/less.php.git",
-                "reference": "39b1fbbdd3d95c5279f231d2298f3866fa869fcd"
+                "reference": "0c64fe7477dbd491b27d3b10fc74a577d3bd66ec"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/wikimedia/less.php/zipball/39b1fbbdd3d95c5279f231d2298f3866fa869fcd",
-                "reference": "39b1fbbdd3d95c5279f231d2298f3866fa869fcd",
+                "url": "https://api.github.com/repos/wikimedia/less.php/zipball/0c64fe7477dbd491b27d3b10fc74a577d3bd66ec",
+                "reference": "0c64fe7477dbd491b27d3b10fc74a577d3bd66ec",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.4.3"
             },
             "require-dev": {
-                "mediawiki/mediawiki-codesniffer": "45.0.0",
-                "mediawiki/mediawiki-phan-config": "0.14.0",
+                "mediawiki/mediawiki-codesniffer": "46.0.0",
+                "mediawiki/mediawiki-phan-config": "0.15.1",
                 "mediawiki/minus-x": "1.1.3",
                 "php-parallel-lint/php-console-highlighter": "1.0.0",
                 "php-parallel-lint/php-parallel-lint": "1.4.0",
-                "phpunit/phpunit": "9.6.16"
+                "phpunit/phpunit": "9.6.21"
             },
             "bin": [
                 "bin/lessc"
@@ -2062,9 +2063,9 @@
             ],
             "support": {
                 "issues": "https://github.com/wikimedia/less.php/issues",
-                "source": "https://github.com/wikimedia/less.php/tree/v5.1.2"
+                "source": "https://github.com/wikimedia/less.php/tree/v5.2.2"
             },
-            "time": "2024-11-13T15:44:20+00:00"
+            "time": "2025-03-24T15:30:20+00:00"
         }
     ],
     "packages-dev": [],

+ 2 - 2
inc/classes/BxDolScore.php

@@ -574,14 +574,14 @@ class BxDolScore extends BxDolObject
         if(empty($aParams) || !is_array($aParams))
             return '';
 
-        return urlencode(base64_encode(serialize($aParams)));
+        return urlencode(base64_encode(json_encode($aParams)));
     }
 
     protected function _decodeElementParams($sParams, $bMergeWithDefaults = true)
     {
         $aParams = array();
         if(!empty($sParams))
-            $aParams = unserialize(base64_decode(urldecode($sParams)));
+            $aParams = json_decode(base64_decode(urldecode($sParams)), true);
 
         if(empty($aParams) || !is_array($aParams))
             $aParams = array();

+ 44 - 0
inc/utils.inc.php

@@ -2720,4 +2720,48 @@ function bx_api_get_browse_params($sParams, $bParamsOnly = false)
 
     return $aParams['params'];
 }
+
+function bx_is_serialized_safe($str) 
+{
+    if (!is_string($str))
+        return false;
+    
+    $str = trim($str);
+    if ($str === 'N;')
+        return true; // null
+    
+    if (!preg_match('/^([adObis]):[0-9]+:/', $str, $matches))
+        return false;
+    
+    $type = $matches[1];
+    
+    // allow only base types, exclude objects (O) are references (r, R)
+    $allowedTypes = ['a', 's', 'i', 'd', 'b'];
+    if (!in_array($type, $allowedTypes))
+        return false;
+    
+    try {
+        $unserialized = unserialize($str);
+        return true;
+    } catch (Exception $e) {
+        return false;
+    }
+}
+
+
+function bx_is_serialized($string) 
+{
+    if (!is_string($string))
+        return false;
+    
+    $string = trim($string);
+
+    // base types    
+    if ($string === 'N;') return true; // null
+    if ($string === 'b:0;' || $string === 'b:1;') return true; // boolean
+    
+    // other types
+    return preg_match('/^([adObis]):[0-9]+:/', $string) === 1;
+}
+
 /** @} */

+ 1 - 1
modules/boonex/convos/classes/BxCnvFormEntry.php

@@ -195,7 +195,7 @@ class BxCnvFormEntry extends BxBaseModTextFormEntry
 
         $sEt = bx_get('et');
         if($sEt !== false) { // if 'attachable email template' was specified, process it
-            $aEt = unserialize(base64_decode(urldecode($sEt)));
+            $aEt = json_decode(base64_decode(urldecode($sEt)), true);
 
             if(!empty($aEt) && is_array($aEt) && !empty($aEt['name'])) {
                 $sName = bx_process_input($aEt['name']);

+ 2 - 2
modules/boonex/payment/classes/BxPaymentConfig.php

@@ -227,12 +227,12 @@ class BxPaymentConfig extends BxBaseModPaymentConfig
 
     public function a2s($a)
     {
-        return base64_encode(serialize($a));
+        return base64_encode(json_encode($a));
     }
 
     public function s2a($s)
     {
-        return unserialize(base64_decode($s));
+        return json_decode(base64_decode($s), true);
     }
 
     public function urlEncode($s)

+ 4 - 4
modules/boonex/payment/classes/BxPaymentModule.php

@@ -517,7 +517,7 @@ class BxPaymentModule extends BxBaseModPaymentModule
 
         $aCustom = array();
         if(!empty($sCustom)) {
-            $aCustom = unserialize(base64_decode($sCustom));
+            $aCustom = json_decode(base64_decode($sCustom), true);
             if(empty($aCustom) || !is_array($aCustom))
                 $aCustom = array();
         }
@@ -557,7 +557,7 @@ class BxPaymentModule extends BxBaseModPaymentModule
 
         $aCustom = array();
         if(!empty($sCustom)) {
-            $aCustom = unserialize(base64_decode($sCustom));
+            $aCustom = json_decode(base64_decode($sCustom), true);
             if(empty($aCustom) || !is_array($aCustom))
                 $aCustom = array();
         }
@@ -608,7 +608,7 @@ class BxPaymentModule extends BxBaseModPaymentModule
 
         $aCustom = array();
         if(!empty($sCustom)) {
-            $aCustom = unserialize(base64_decode($sCustom));
+            $aCustom = json_decode(base64_decode($sCustom), true);
             if(empty($aCustom) || !is_array($aCustom))
                 $aCustom = array();
         }
@@ -1763,7 +1763,7 @@ class BxPaymentModule extends BxBaseModPaymentModule
                 'iItemCount' => $iItemCount,
                 'sItemAddons' => $sItemAddons,
                 'sRedirect' => $sRedirect,
-                'sCustom' => base64_encode(serialize($aCustom))
+                'sCustom' => base64_encode(json_encode($aCustom))
             );
 
             $aCartInfo = $this->getObjectCart()->getInfo(BX_PAYMENT_TYPE_RECURRING, $iClientId, $iSellerId, $this->_oConfig->descriptorA2S($aCartItem));

+ 4 - 4
modules/boonex/payment/classes/BxPaymentTemplate.php

@@ -99,7 +99,7 @@ class BxPaymentTemplate extends BxBaseModPaymentTemplate
             'item_id' => $iItemId,
             'item_count' => $iItemCount,
             'need_redirect' => (int)$bNeedRedirect,
-            'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
+            'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(json_encode($aCustom)) : ''
         ));
 
         return array($sJsCode, $sJsMethod);
@@ -117,7 +117,7 @@ class BxPaymentTemplate extends BxBaseModPaymentTemplate
             'item_id' => $iItemId,
             'item_count' => $iItemCount,
             'need_redirect' => (int)$bNeedRedirect,
-            'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
+            'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(json_encode($aCustom)) : ''
         ));
     }
 
@@ -146,7 +146,7 @@ class BxPaymentTemplate extends BxBaseModPaymentTemplate
                 'item_id' => $iItemId,
                 'item_count' => $iItemCount,
                 'redirect' => !empty($sRedirect) ? $sRedirect : '',
-                'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
+                'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(json_encode($aCustom)) : ''
             ))
         );
     }
@@ -164,7 +164,7 @@ class BxPaymentTemplate extends BxBaseModPaymentTemplate
             'item_id' => $iItemId,
             'item_count' => $iItemCount,
             'redirect' => !empty($sRedirect) ? $sRedirect : '',
-            'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(serialize($aCustom)) : ''
+            'custom' => !empty($aCustom) && is_array($aCustom) ? base64_encode(json_encode($aCustom)) : ''
         ));
     }
 

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineMenuItemShare.php

@@ -68,7 +68,7 @@ class BxTimelineMenuItemShare extends BxTemplMenu
             $sRepostToOnclick = $this->_oModule->serviceGetRepostToJsClick($iOwnerId, $sType, $sAction, $iObjectId);
 
             //--- Send item
-            $sAetSend = urlencode(base64_encode(serialize([
+            $sAetSend = urlencode(base64_encode(json_encode([
                 'name' => 'bx_timeline_send',
                 'params' => [
                     'ViewLink' => $this->_aEvent['url']

File diff ditekan karena terlalu besar
+ 286 - 315
package-lock.json


+ 16 - 3
storage.php

@@ -92,10 +92,23 @@ if (!$oStorage->download($sRemoteId, $sToken)) {
 
 function bx_storage_download_error_occured($sMethod = 'displayPageNotFound')
 {
-    require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+    bx_import('BxDolLanguages');
 
-    $oTemplate = BxDolTemplate::getInstance();
-    $oTemplate->$sMethod ();
+    if ('displayPageNotFound' == $sMethod) {
+        header('HTTP/1.0 404 Not Found');
+        header('Status: 404 Not Found');
+        echo json_encode(['status' => 404, 'error' => _t("_sys_request_page_not_found_cpt")]);
+    }
+    if ('displayAccessDenied' == $sMethod) {
+        header('HTTP/1.0 403 Forbidden');
+        header('Status: 403 Forbidden');
+        echo json_encode(['status' => 403, 'error' => _t("_Access denied")]);
+    }
+    if ('displayErrorOccured' == $sMethod) {
+        header('HTTP/1.0 500 Internal Server Error');
+        header('Status: 500 Internal Server Error');
+        echo json_encode(['status' => 500, 'error' => _t("_error occured")]);
+    }
 }
 
 /** @} */

+ 2 - 2
studio/classes/BxDolStudioInstallerUtils.php

@@ -434,7 +434,7 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
         $aItem = $this->getAccessObject(false)->load($this->sStoreDataUrlPublic . 'json_download_update', array(
             'key' => getParam('sys_oauth_key'),
             'version' => bx_get_ver(),
-            'product' => base64_encode(serialize(array(
+            'product' => base64_encode(json_encode(array(
                 'name' => $aModule['name'],
                 'version' => $aModule['version'],
                 'hash' => $aModule['hash'],
@@ -693,7 +693,7 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
             );
         }
 
-        return base64_encode(serialize($aProducts));
+        return base64_encode(json_encode($aProducts));
     }
 
     protected function getUpdatesInfo($sModule = '', $bAuthorizedAccess = false)

+ 1 - 1
studio/classes/BxDolStudioStore.php

@@ -378,7 +378,7 @@ class BxDolStudioStore extends BxTemplStudioWidget
                 $aCounts[$aItem['item_id']] = $aItem['item_count'];
             }
 
-            $aProducts = $oJson->load($this->sStoreDataUrlPublic . 'json_browse_selected', array('products' => base64_encode(serialize($aIds)), 'client' => $this->iClient, 'key' => $this->sClientKey));
+            $aProducts = $oJson->load($this->sStoreDataUrlPublic . 'json_browse_selected', array('products' => base64_encode(json_encode($aIds)), 'client' => $this->iClient, 'key' => $this->sClientKey));
             if(!empty($aProducts))
                 $aResult[$sVendor] = array(
                     'ids' => $aIds,

+ 2 - 2
template/scripts/BxBaseMenuSetAclLevel.php

@@ -49,7 +49,7 @@ class BxBaseMenuSetAclLevel extends BxTemplMenu
         if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' && ($mixedProfileId = bx_get('profile_id', 'post')) && ($iAclLevelId = bx_get('level_id', 'post'))) {
             $mixedProfileId = urldecode($mixedProfileId);
             if(!is_numeric($mixedProfileId))
-                $mixedProfileId = unserialize($mixedProfileId);
+                $mixedProfileId = json_decode($mixedProfileId, true);
 
             echoJson($this->setMembership($mixedProfileId, $iAclLevelId, bx_get('duration', 'post') !== false ? (int)bx_get('duration', 'post') : 0, (int)bx_get('card', 'post') > 0));
             exit;
@@ -128,7 +128,7 @@ class BxBaseMenuSetAclLevel extends BxTemplMenu
                 'title' => $sTitle,
                 'icon' => '',
                 'link' => 'javascript:void(0);',
-                'onclick' => "bx_set_acl_level(" . (!$bBulk ? $mixedProfileId : "'" . urlencode(serialize($mixedProfileId)) . "'") . ", {$iId}, " . bx_js_string("$(this).parents('.bx-popup-applied:first')") . ");"
+                'onclick' => "bx_set_acl_level(" . (!$bBulk ? $mixedProfileId : "'" . urlencode(json_encode($mixedProfileId)) . "'") . ", {$iId}, " . bx_js_string("$(this).parents('.bx-popup-applied:first')") . ");"
             );
         }
 

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini