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

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

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


Commits:
143dcd24 by Victor Emanouilov at 2026-01-30T11:33:53+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/143dcd24bc28c62aefd2937fb2e9b29d8c0501de

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/143dcd24bc28c62aefd2937fb2e9b29d8c0501de
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.