Browse Source

Merge branch 'master' of https://github.com/unacms/UNA

AntonLV 2 months ago
parent
commit
84c047af25

+ 5 - 1
inc/classes/BxDolDb.php

@@ -380,8 +380,10 @@ class BxDolDb extends BxDolFactory implements iBxDolSingleton
         	return array();
 
         $aResult = $oStatement->fetch($iFetchType);
-        if($aResult === false)
+        if($aResult === false) {
+            $oStatement->closeCursor();
         	return array();
+        }
 
 		$this->_oStatement = $oStatement;
         return $aResult;
@@ -402,7 +404,9 @@ class BxDolDb extends BxDolFactory implements iBxDolSingleton
 		if($aResult !== false)
 			return $aResult;
 
+        $this->_oStatement->closeCursor();
 		$this->_oStatement = null;
+
     	return array();
     }
 

+ 3 - 0
inc/classes/BxDolForm.php

@@ -175,6 +175,9 @@ bx_import('BxDolPrivacy');
  * - attrs
  * - attrs_tr
  * - attrs_wrapper
+ * - secret - if true, in view mode the value is shown masked (for example `abcd********xyz1`) with an eye icon on the right.
+ *            Clicking the icon reloads the current page block with that field revealed. Reveal is POSTed with a form CSRF token, so a GET param alone is not enough. The full value is not included in the initial HTML.
+ *            Example: `$this->aInputs['password']['secret'] = true;`
  *
  * We will not describe above list of parameters in every type, since they work the same way for all types.
  *

+ 41 - 4
inc/js/functions.js

@@ -159,7 +159,7 @@ function loadDynamicBlockAutoSort (e, sort, sAdditionalUrlParams) {
  * @param e - element inside the block
  * @return true on success, or false on error - particularly, if block isn't found
  */
-function loadDynamicBlockAuto(e, sUrl) {
+function loadDynamicBlockAuto(e, sUrl, oPostData) {
     var oContainer = $(e).parents('.bx-page-block-container:first:not(.no-dynamic)');
     var sId = oContainer.attr('id');
 
@@ -187,17 +187,54 @@ function loadDynamicBlockAuto(e, sUrl) {
     	sUrl = bx_append_url_params(sUrl, oParams);
     }
 
-    loadDynamicBlock(parseInt(aMatches[1]), sUrl);
+    loadDynamicBlock(parseInt(aMatches[1]), sUrl, oPostData);
     return true;
 }
 
-function loadDynamicBlock(iBlockID, sUrl) {
+/**
+ * Reload the current page block to show or hide a form secret field.
+ * Reveal is POSTed with a CSRF token so it cannot be triggered by a GET param alone.
+ * When the form is not inside a page block, the whole page is reloaded via POST.
+ */
+function bx_form_secret_toggle(e) {
+    var oToggle = $(e);
+    var bHide = oToggle.closest('.bx-form-secret').hasClass('bx-form-secret-shown');
+    var sField = oToggle.attr('bx_form_secret_field');
+    var sCsrfToken = oToggle.attr('bx_form_secret_csrf');
+
+    var sUrl = location.href;
+    try {
+        var oUrl = new URL(sUrl);
+        oUrl.searchParams.delete('form_secret_reveal');
+        oUrl.searchParams.delete('csrf_token');
+        sUrl = oUrl.toString();
+    } catch (oErr) {
+        sUrl = sUrl.replace(/([?&])form_secret_reveal=[^&]*/g, '$1').replace(/([?&])csrf_token=[^&]*/g, '$1').replace(/[?&]$/, '');
+    }
+
+    if (bHide) {
+        if (!loadDynamicBlockAuto(e, sUrl))
+            location.href = sUrl;
+        return false;
+    }
+
+    var oData = {form_secret_reveal: sField};
+    if (sCsrfToken)
+        oData.csrf_token = sCsrfToken;
+
+    return loadDynamicBlockAuto(e, sUrl, oData);
+}
+
+function loadDynamicBlock(iBlockID, sUrl, oPostData) {
     
     var oCallback = null;
     if($('#bx-page-block-' + iBlockID + ' .bx-base-unit-showcase-wrapper').length){
         oCallback = bx_showcase_view_init;
     }
-    getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(sUrl, 'dynamic=tab&pageBlock=' + iBlockID), oCallback);
+    if (typeof oPostData != 'undefined' && oPostData)
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(sUrl, 'dynamic=tab&pageBlock=' + iBlockID), oCallback, 'post', false, oPostData);
+    else
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(sUrl, 'dynamic=tab&pageBlock=' + iBlockID), oCallback);
     return true;
 }
 

+ 21 - 0
modules/boonex/artificer/data/template/system/css/forms.css

@@ -433,3 +433,24 @@ import url(../../../../../../../template/css/forms.css);
     border-bottom:none !important;
 }
 
+.bx-form-secret {
+    display: inline-flex;
+    align-items: center;
+    justify-content: flex-start;
+    gap: 0.5rem;
+    max-width: 100%;
+    min-width: 0;
+}
+.bx-form-secret-value {
+    min-width: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-family: monospace;
+}
+.bx-form-secret-toggle {
+    flex-shrink: 0;
+    line-height: 1;
+    cursor: pointer;
+}
+

+ 137 - 110
modules/boonex/azure_b2c_con/composer.lock

@@ -75,20 +75,20 @@
         },
         {
             "name": "psr/cache",
-            "version": "1.0.1",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/cache.git",
-                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+                "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
-                "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+                "url": "https://api.github.com/repos/php-fig/cache/zipball/213f9dbc5b9bfbc4f8db86d2838dc968752ce13b",
+                "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.0"
+                "php": ">=8.0.0"
             },
             "type": "library",
             "extra": {
@@ -108,7 +108,7 @@
             "authors": [
                 {
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
             ],
             "description": "Common interface for caching libraries",
@@ -118,28 +118,33 @@
                 "psr-6"
             ],
             "support": {
-                "source": "https://github.com/php-fig/cache/tree/master"
+                "source": "https://github.com/php-fig/cache/tree/2.0.0"
             },
-            "time": "2016-08-06T20:24:11+00:00"
+            "time": "2021-02-03T23:23:37+00:00"
         },
         {
             "name": "psr/container",
-            "version": "1.1.1",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/container.git",
-                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+                "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
-                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+                "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+                "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2.0"
+                "php": ">=7.4.0"
             },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
             "autoload": {
                 "psr-4": {
                     "Psr\\Container\\": "src/"
@@ -166,36 +171,36 @@
             ],
             "support": {
                 "issues": "https://github.com/php-fig/container/issues",
-                "source": "https://github.com/php-fig/container/tree/1.1.1"
+                "source": "https://github.com/php-fig/container/tree/2.0.2"
             },
-            "time": "2021-03-05T17:36:06+00:00"
+            "time": "2021-11-05T16:47:00+00:00"
         },
         {
             "name": "psr/log",
-            "version": "1.1.4",
+            "version": "3.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/log.git",
-                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+                "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
-                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
+                "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.0"
+                "php": ">=8.0.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.1.x-dev"
+                    "dev-master": "3.x-dev"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "Psr\\Log\\": "Psr/Log/"
+                    "Psr\\Log\\": "src"
                 }
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -216,22 +221,22 @@
                 "psr-3"
             ],
             "support": {
-                "source": "https://github.com/php-fig/log/tree/1.1.4"
+                "source": "https://github.com/php-fig/log/tree/3.0.2"
             },
-            "time": "2021-05-03T11:20:27+00:00"
+            "time": "2024-09-11T13:17:53+00:00"
         },
         {
             "name": "symfony/cache",
-            "version": "v5.4.8",
+            "version": "v5.4.53",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/cache.git",
-                "reference": "4c6747cf7e56c6b8e3094dd24852bd3e364375b1"
+                "reference": "bf581474737420d5c932ae80b868e253f465ee5b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/cache/zipball/4c6747cf7e56c6b8e3094dd24852bd3e364375b1",
-                "reference": "4c6747cf7e56c6b8e3094dd24852bd3e364375b1",
+                "url": "https://api.github.com/repos/symfony/cache/zipball/bf581474737420d5c932ae80b868e253f465ee5b",
+                "reference": "bf581474737420d5c932ae80b868e253f465ee5b",
                 "shasum": ""
             },
             "require": {
@@ -259,8 +264,8 @@
             "require-dev": {
                 "cache/integration-tests": "dev-master",
                 "doctrine/cache": "^1.6|^2.0",
-                "doctrine/dbal": "^2.13.1|^3.0",
-                "predis/predis": "^1.1",
+                "doctrine/dbal": "^2.13.1|^3|^4",
+                "predis/predis": "^1.1|^2.0",
                 "psr/simple-cache": "^1.0|^2.0",
                 "symfony/config": "^4.4|^5.0|^6.0",
                 "symfony/dependency-injection": "^4.4|^5.0|^6.0",
@@ -292,14 +297,14 @@
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation",
+            "description": "Provides extended PSR-6, PSR-16 (and tags) implementations",
             "homepage": "https://symfony.com",
             "keywords": [
                 "caching",
                 "psr6"
             ],
             "support": {
-                "source": "https://github.com/symfony/cache/tree/v5.4.8"
+                "source": "https://github.com/symfony/cache/tree/v5.4.53"
             },
             "funding": [
                 {
@@ -310,25 +315,29 @@
                     "url": "https://github.com/fabpot",
                     "type": "github"
                 },
+                {
+                    "url": "https://github.com/nicolas-grekas",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-04-26T13:19:20+00:00"
+            "time": "2026-05-24T08:41:21+00:00"
         },
         {
             "name": "symfony/cache-contracts",
-            "version": "v2.5.1",
+            "version": "v2.5.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/cache-contracts.git",
-                "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc"
+                "reference": "517c3a3619dadfa6952c4651767fcadffb4df65e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc",
-                "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc",
+                "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/517c3a3619dadfa6952c4651767fcadffb4df65e",
+                "reference": "517c3a3619dadfa6952c4651767fcadffb4df65e",
                 "shasum": ""
             },
             "require": {
@@ -340,12 +349,12 @@
             },
             "type": "library",
             "extra": {
+                "thanks": {
+                    "url": "https://github.com/symfony/contracts",
+                    "name": "symfony/contracts"
+                },
                 "branch-alias": {
                     "dev-main": "2.5-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -378,7 +387,7 @@
                 "standards"
             ],
             "support": {
-                "source": "https://github.com/symfony/cache-contracts/tree/v2.5.1"
+                "source": "https://github.com/symfony/cache-contracts/tree/v2.5.4"
             },
             "funding": [
                 {
@@ -394,33 +403,33 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-01-02T09:53:40+00:00"
+            "time": "2024-09-25T14:11:13+00:00"
         },
         {
             "name": "symfony/deprecation-contracts",
-            "version": "v2.5.1",
+            "version": "v3.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/deprecation-contracts.git",
-                "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
+                "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
-                "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b",
+                "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.1"
+                "php": ">=8.1"
             },
             "type": "library",
             "extra": {
-                "branch-alias": {
-                    "dev-main": "2.5-dev"
-                },
                 "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
+                    "url": "https://github.com/symfony/contracts",
+                    "name": "symfony/contracts"
+                },
+                "branch-alias": {
+                    "dev-main": "3.7-dev"
                 }
             },
             "autoload": {
@@ -445,7 +454,7 @@
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
+                "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0"
             },
             "funding": [
                 {
@@ -456,38 +465,39 @@
                     "url": "https://github.com/fabpot",
                     "type": "github"
                 },
+                {
+                    "url": "https://github.com/nicolas-grekas",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-01-02T09:53:40+00:00"
+            "time": "2026-04-13T15:52:40+00:00"
         },
         {
             "name": "symfony/polyfill-php73",
-            "version": "v1.25.0",
+            "version": "v1.37.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
+                "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
-                "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+                "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.1"
+                "php": ">=7.2"
             },
             "type": "library",
             "extra": {
-                "branch-alias": {
-                    "dev-main": "1.23-dev"
-                },
                 "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "url": "https://github.com/symfony/polyfill",
+                    "name": "symfony/polyfill"
                 }
             },
             "autoload": {
@@ -524,7 +534,7 @@
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
+                "source": "https://github.com/symfony/polyfill-php73/tree/v1.37.0"
             },
             "funding": [
                 {
@@ -535,38 +545,39 @@
                     "url": "https://github.com/fabpot",
                     "type": "github"
                 },
+                {
+                    "url": "https://github.com/nicolas-grekas",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-06-05T21:20:04+00:00"
+            "time": "2024-09-09T11:45:10+00:00"
         },
         {
             "name": "symfony/polyfill-php80",
-            "version": "v1.25.0",
+            "version": "v1.37.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
+                "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
-                "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411",
+                "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.1"
+                "php": ">=7.2"
             },
             "type": "library",
             "extra": {
-                "branch-alias": {
-                    "dev-main": "1.23-dev"
-                },
                 "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "url": "https://github.com/symfony/polyfill",
+                    "name": "symfony/polyfill"
                 }
             },
             "autoload": {
@@ -607,7 +618,7 @@
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0"
             },
             "funding": [
                 {
@@ -618,52 +629,56 @@
                     "url": "https://github.com/fabpot",
                     "type": "github"
                 },
+                {
+                    "url": "https://github.com/nicolas-grekas",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-03-04T08:16:47+00:00"
+            "time": "2026-04-10T16:19:22+00:00"
         },
         {
             "name": "symfony/service-contracts",
-            "version": "v2.5.1",
+            "version": "v3.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c"
+                "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c",
-                "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a",
+                "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2.5",
-                "psr/container": "^1.1",
-                "symfony/deprecation-contracts": "^2.1|^3"
+                "php": ">=8.1",
+                "psr/container": "^1.1|^2.0",
+                "symfony/deprecation-contracts": "^2.5|^3"
             },
             "conflict": {
                 "ext-psr": "<1.1|>=2"
             },
-            "suggest": {
-                "symfony/service-implementation": ""
-            },
             "type": "library",
             "extra": {
-                "branch-alias": {
-                    "dev-main": "2.5-dev"
-                },
                 "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
+                    "url": "https://github.com/symfony/contracts",
+                    "name": "symfony/contracts"
+                },
+                "branch-alias": {
+                    "dev-main": "3.7-dev"
                 }
             },
             "autoload": {
                 "psr-4": {
                     "Symfony\\Contracts\\Service\\": ""
-                }
+                },
+                "exclude-from-classmap": [
+                    "/Test/"
+                ]
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
@@ -690,7 +705,7 @@
                 "standards"
             ],
             "support": {
-                "source": "https://github.com/symfony/service-contracts/tree/v2.5.1"
+                "source": "https://github.com/symfony/service-contracts/tree/v3.7.0"
             },
             "funding": [
                 {
@@ -701,33 +716,39 @@
                     "url": "https://github.com/fabpot",
                     "type": "github"
                 },
+                {
+                    "url": "https://github.com/nicolas-grekas",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-03-13T20:07:29+00:00"
+            "time": "2026-03-28T09:44:51+00:00"
         },
         {
             "name": "symfony/var-exporter",
-            "version": "v5.4.8",
+            "version": "v6.4.37",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/var-exporter.git",
-                "reference": "7e132a3fcd4b57add721b4207236877b6017ec93"
+                "reference": "34f6957deffacabd1b1c579a312daa481e3e99ca"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/var-exporter/zipball/7e132a3fcd4b57add721b4207236877b6017ec93",
-                "reference": "7e132a3fcd4b57add721b4207236877b6017ec93",
+                "url": "https://api.github.com/repos/symfony/var-exporter/zipball/34f6957deffacabd1b1c579a312daa481e3e99ca",
+                "reference": "34f6957deffacabd1b1c579a312daa481e3e99ca",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2.5",
-                "symfony/polyfill-php80": "^1.16"
+                "php": ">=8.1",
+                "symfony/deprecation-contracts": "^2.5|^3"
             },
             "require-dev": {
-                "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0"
+                "symfony/property-access": "^6.4|^7.0",
+                "symfony/serializer": "^6.4|^7.0",
+                "symfony/var-dumper": "^5.4|^6.0|^7.0"
             },
             "type": "library",
             "autoload": {
@@ -760,10 +781,12 @@
                 "export",
                 "hydrate",
                 "instantiate",
+                "lazy-loading",
+                "proxy",
                 "serialize"
             ],
             "support": {
-                "source": "https://github.com/symfony/var-exporter/tree/v5.4.8"
+                "source": "https://github.com/symfony/var-exporter/tree/v6.4.37"
             },
             "funding": [
                 {
@@ -774,21 +797,25 @@
                     "url": "https://github.com/fabpot",
                     "type": "github"
                 },
+                {
+                    "url": "https://github.com/nicolas-grekas",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-04-26T13:19:20+00:00"
+            "time": "2026-04-14T12:12:40+00:00"
         }
     ],
     "packages-dev": [],
     "aliases": [],
     "minimum-stability": "stable",
-    "stability-flags": [],
+    "stability-flags": {},
     "prefer-stable": false,
     "prefer-lowest": false,
-    "platform": [],
-    "platform-dev": [],
-    "plugin-api-version": "2.3.0"
+    "platform": {},
+    "platform-dev": {},
+    "plugin-api-version": "2.9.0"
 }

+ 2 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -3238,6 +3238,8 @@ If it is not enabled then please consider implementing this optimization, since
 	<string name="_sys_form_review_input_caption_system_id"><![CDATA[Object ID]]></string>
 	<string name="_sys_form_review_input_caption_system_sys"><![CDATA[Object Type]]></string>
 	<string name="_sys_form_review_input_submit"><![CDATA[Post]]></string>
+	<string name="_sys_form_secret_hide"><![CDATA[Hide]]></string>
+	<string name="_sys_form_secret_reveal"><![CDATA[Show]]></string>
 	<string name="_sys_form_unsubscribe"><![CDATA[Unsubscribe]]></string>
 	<string name="_sys_form_unsubscribe_input_caption_system_code"><![CDATA[Security Code]]></string>
 	<string name="_sys_form_unsubscribe_input_caption_system_do_submit"><![CDATA[Submit]]></string>

+ 2 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -3212,6 +3212,8 @@
 	<string name="_sys_form_review_input_caption_system_id"><![CDATA[ID объекта]]></string>
 	<string name="_sys_form_review_input_caption_system_sys"><![CDATA[Тип объекта]]></string>
 	<string name="_sys_form_review_input_submit"><![CDATA[Отправить]]></string>
+	<string name="_sys_form_secret_hide"><![CDATA[Скрыть]]></string>
+	<string name="_sys_form_secret_reveal"><![CDATA[Показать]]></string>
 	<string name="_sys_form_unsubscribe"><![CDATA[Отписаться]]></string>
 	<string name="_sys_form_unsubscribe_input_caption_system_code"><![CDATA[Код безопасности]]></string>
 	<string name="_sys_form_unsubscribe_input_caption_system_do_submit"><![CDATA[Выполнить]]></string>

+ 1 - 1
package.json

@@ -13,7 +13,7 @@
     "clipboard": "^2.0.11",
     "codemirror": "^5.65.21",
     "croppie": "^2.6.5",
-    "dashjs": "^5.2.0",
+    "dashjs": "^5.2.1",
     "fancybox": "^3.0.1",
     "fg-loadcss": "^3.1.0",
     "filepond": "^4.32.12",

+ 21 - 0
template/css/forms.css

@@ -445,6 +445,27 @@
     font-weight:bold;
 }
 
+.bx-form-secret {
+    display: inline-flex;
+    align-items: center;
+    justify-content: flex-start;
+    gap: 0.5rem;
+    max-width: 100%;
+    min-width: 0;
+}
+.bx-form-secret-value {
+    min-width: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-family: monospace;
+}
+.bx-form-secret-toggle {
+    flex-shrink: 0;
+    line-height: 1;
+    cursor: pointer;
+}
+
 
 /****************************************
 *		Custom reCaptcha Theme

+ 4 - 0
template/form_view_secret.html

@@ -0,0 +1,4 @@
+<div class="bx-form-secret __class__">
+    <span class="bx-form-secret-value">__value__</span>
+    <a href="javascript:void(0);" class="bx-form-secret-toggle" title="__title__" bx_form_secret_field="__name__" bx_form_secret_csrf="__csrf__" onclick="return bx_form_secret_toggle(this);"><i class="sys-icon __icon__"></i></a>
+</div>

+ 66 - 0
template/scripts/BxBaseFormView.php

@@ -72,6 +72,11 @@ class BxBaseFormView extends BxDolForm
      */
     protected $_bViewMode = false;
 
+    /**
+     * Cached CSRF check for revealing a secret field in the current request.
+     */
+    protected $_bSecretRevealCsrfValid = null;
+
     /**
      * Show or not sections which have no fileds
      */
@@ -502,6 +507,11 @@ class BxBaseFormView extends BxDolForm
                 ];
             }
 
+            if ($this->_isSecretInput($aInput) && isset($aInput['value']) && $aInput['value'] !== '' && $aInput['value'] !== null && !is_array($aInput['value'])) {
+                if (!$this->isViewMode() || !$this->_isSecretRevealed($aInput['name']))
+                    $aInput['value'] = bx_gen_secret((string)$aInput['value']);
+            }
+
             /**
              * Everytime when [key => value] is used it should be converted to [key => ..., value => ...]
              */
@@ -918,6 +928,11 @@ BLAH;
         $sClass = !empty($aParams['class']) ? $aParams['class'] : '';
         $sClassValue = !empty($aParams['class_value']) ? $aParams['class_value'] : '';
 
+        if ($this->_isSecretInput($aInput)) {
+            $sValue = $this->_wrapSecretViewRowValue($aInput, $sValue, $this->_isSecretRevealed($aInput['name']));
+            $sClassValue .= ($sClassValue ? ' ' : '') . 'bx-form-row-view-value-secret';
+        }
+
         $aTmplVarsIcon = [];
         if(!empty($aInput['icon']))
             $aTmplVarsIcon = [
@@ -945,6 +960,11 @@ BLAH;
      */
     function genViewRowValue(&$aInput)
     {
+        if ($this->_isSecretInput($aInput) && !$this->_isSecretRevealed($aInput['name'])) {
+            $sRaw = $this->_getSecretRawValue($aInput);
+            return $sRaw !== '' ? bx_process_output(bx_gen_secret($sRaw)) : null;
+        }
+
         if (!empty($aInput['name'])) {
             $sCustomMethod = 'genCustomViewRowValue' . $this->_genMethodName($aInput['name']);
             if (method_exists($this, $sCustomMethod))
@@ -1048,6 +1068,52 @@ BLAH;
         return $s;
     }
 
+    protected function _isSecretInput($aInput)
+    {
+        return !empty($aInput['secret']) && !empty($aInput['name']);
+    }
+
+    protected function _isSecretRevealed($sName)
+    {
+        $mixed = bx_get('form_secret_reveal');
+        if ($mixed === false || $sName === '' || $sName === null)
+            return false;
+        if (is_array($mixed)) {
+            if (!in_array((string)$sName, array_map('strval', $mixed), true))
+                return false;
+        } else if ((string)$mixed !== (string)$sName) {
+            return false;
+        }
+
+        if ($this->_bSecretRevealCsrfValid === null) {
+            $mixedToken = bx_get('csrf_token');
+            $this->_bSecretRevealCsrfValid = BxDolForm::isCsrfTokenValid($mixedToken === false ? '' : $mixedToken);
+        }
+
+        return $this->_bSecretRevealCsrfValid;
+    }
+
+    protected function _getSecretRawValue(&$aInput)
+    {
+        if (!isset($aInput['value']) || $aInput['value'] === '' || $aInput['value'] === null || is_array($aInput['value']))
+            return '';
+        return (string)$aInput['value'];
+    }
+
+    protected function _wrapSecretViewRowValue(&$aInput, $sValue, $bRevealed = false)
+    {
+        $mixedToken = !$bRevealed ? BxDolForm::getCsrfToken() : false;
+
+        return $this->oTemplate->parseHtmlByName('form_view_secret.html', [
+            'class' => $bRevealed ? 'bx-form-secret-shown' : '',
+            'value' => $sValue,
+            'title' => bx_html_attribute(_t($bRevealed ? '_sys_form_secret_hide' : '_sys_form_secret_reveal')),
+            'name' => bx_html_attribute($aInput['name']),
+            'csrf' => $mixedToken ? bx_html_attribute($mixedToken) : '',
+            'icon' => $bRevealed ? 'eye-slash' : 'eye',
+        ]);
+    }
+
     protected function genCustomRowBirthday(&$aInput)
     {
         if(!$this->_bViewMode)

+ 1 - 1
tests/composer.json

@@ -1,7 +1,7 @@
 {
     "name": "una.io/una-tests",
     "require-dev": {
-        "phpunit/phpunit": "11.*",
+        "phpunit/phpunit": "12.*",
         "phpmd/phpmd": "@stable"
     }
 }

File diff suppressed because it is too large
+ 197 - 295
tests/composer.lock


+ 4 - 4
yarn.lock

@@ -1043,10 +1043,10 @@ cssesc@^3.0.0:
   resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
   integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
 
-dashjs@^5.2.0:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/dashjs/-/dashjs-5.2.0.tgz#f525071da302e3bafe6dbc1f1f68b1815654f29a"
-  integrity sha512-2W2KHFN53Sk7+rtdnIfSUK/3Oov+hraMTeVZwDOTSCNKM1cQtFiJdblNzRMnl59a/QDseG7JW+PC9mh/B+CMcg==
+dashjs@^5.2.1:
+  version "5.2.1"
+  resolved "https://registry.yarnpkg.com/dashjs/-/dashjs-5.2.1.tgz#c36648002e0e278f897aa7e2fc9a79ae05560d57"
+  integrity sha512-axcJmLeJCTJMLUfQRErUJB1KOiU5iHF+DMLBc3FKeox1HPYtGUQlC6Xm5Mm6vhBUR3CHHLIPOqw0JDIqMtP+Dw==
   dependencies:
     "@svta/cml-608" "1.0.2"
     "@svta/cml-cmcd" "2.3.2"

Some files were not shown because too many files changed in this diff