[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] prevent double decoding in odbc

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

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
527d9fd1 by Victor Emanouilov at 2026-01-30T11:34:09+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/527d9fd1bc00cb83ee570f239ef6c9d0743b252f

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