[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] prevent double decoding in odbc

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <697c7b278699b_3b183e04440ba@gitlab-sidekiq-low-urgency-cpu-bound-v2-56bd48c5f6-pkpm9.mail>

Victor Emanouilov pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
dfead399 by Victor Emanouilov at 2026-01-30T11:34:22+02:00
[FIX] prevent double decoding in odbc

- - - - -


1 changed file:

- lib/core/Tracker/Tabular/Manager.php


Changes:

=====================================
lib/core/Tracker/Tabular/Manager.php
=====================================
@@ -330,7 +330,9 @@ class Manager
     {
         try {
             if (! empty($odbc_config['permanent_values'])) {
-                $odbc_config['permanent_values'] = json_decode($odbc_config['permanent_values'], true, 512, JSON_THROW_ON_ERROR);
+                if (is_scalar($odbc_config['permanent_values'])) {
+                    $odbc_config['permanent_values'] = json_decode($odbc_config['permanent_values'], true, 512, JSON_THROW_ON_ERROR);
+                }
                 if (! is_array($odbc_config['permanent_values'])) {
                     throw new Exception('invalid format');
                 }
@@ -347,7 +349,9 @@ class Manager
         }
         try {
             if (! empty($odbc_config['value_mappings'])) {
-                $odbc_config['value_mappings'] = @json_decode($odbc_config['value_mappings'], true, 512, JSON_THROW_ON_ERROR);
+                if (is_string($odbc_config['value_mappings'])) {
+                    $odbc_config['value_mappings'] = json_decode($odbc_config['value_mappings'], true, 512, JSON_THROW_ON_ERROR);
+                }
                 if (! is_array($odbc_config['value_mappings'])) {
                     throw new Exception('invalid format');
                 }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/dfead3991fec2ede8ea7db4dec32c63a77fc4a46

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/dfead3991fec2ede8ea7db4dec32c63a77fc4a46
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.