[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Tiki filters sanitization

"Elifeleti Mukisa Dan \(@Danelif\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68d7e663a77f9_2cdf994960ee@gitlab-sidekiq-low-urgency-cpu-bound-v2-5cc58485fb-hj4cd.mail>

Elifeleti Mukisa Dan pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
898edab7 by Moïse Nturubika at 2025-09-27T13:20:09+00:00
[ENH] Tiki  filters sanitization
---
* [ENH] Enhance tiki filter in tiki-edit_blog.php

* [ENH] Enhance tiki filter in tiki-edit_languages.php

* [ENH] Enhance tiki filter in tiki-edit_docs.php

* [ENH] Enhance tiki filter in tiki-edit_blog.php

* [ENH] Enhance tiki filter in tiki-edit_banner.php

* [ENH] Enhance tiki filter in tiki-directory_validate_sites.php

* [ENH] Enhance tiki filter in tiki-directory_search.php

* [ENH] Enhance TIki filter in tiki-directory_admin_sites.php

See merge request tikiwiki/tiki!8652

- - - - -


7 changed files:

- tiki-directory_admin_sites.php
- tiki-directory_search.php
- tiki-directory_validate_sites.php
- tiki-edit_banner.php
- tiki-edit_blog.php
- tiki-edit_docs.php
- tiki-edit_languages.php


Changes:

=====================================
tiki-directory_admin_sites.php
=====================================
@@ -11,13 +11,17 @@ $inputConfiguration = [
             'siteId'                      => 'int',           //post
             'remove'                      => 'int',           //get
             'name'                        => 'string',        //post
+            'description'                 => 'string',        //post
             'url'                         => 'url',           //post
-            'siteCats'                    => 'string',        //post
             'isValid'                     => 'bool',          //post
             'country'                     => 'string',        //post
             'sort_mode'                   => 'string',        //get
             'offset'                      => 'int',           //get
             'find'                        => 'string',        //get
+            'save'                        => 'bool',          //post
+        ],
+        'staticKeyFiltersForArrays'      => [
+            'siteCats'                    => 'int',           //post
         ],
     ],
 ];


=====================================
tiki-directory_search.php
=====================================
@@ -19,7 +19,7 @@ $inputConfiguration = [
             'where' => 'word',
             'how' => 'word',
             'words' => 'striptags',
-            'sort_mode' => 'word',
+            'sort_mode' => 'alnumdash',
         ],
     ]
 ];


=====================================
tiki-directory_validate_sites.php
=====================================
@@ -11,7 +11,6 @@
 $inputConfiguration = [
     [
         'staticKeyFilters'                => [
-            'sites'                       => 'string',        //get
             'validate'                    => 'bool',          //get
             'remove'                      => 'int',           //get
             'del'                         => 'bool',          //get
@@ -19,6 +18,9 @@ $inputConfiguration = [
             'offset'                      => 'int',           //get
             'find'                        => 'string',        //get
         ],
+        'staticKeyFiltersForArrays'      => [
+            'sites'                       => 'int',           //get
+        ],
     ],
 ];
 require_once('tiki-setup.php');


=====================================
tiki-edit_banner.php
=====================================
@@ -15,14 +15,14 @@ $inputConfiguration = [
             'removeZone'                  => 'string',        //post
             'save'                        => 'bool',          //post
             'create_zone'                 => 'bool',          //post
-            'fromTimeMeridian'            => 'int',           //post
+            'fromTimeMeridian'            => 'string',        //post
             'fromTimeHour'                => 'digits',        //post
-            'toTimeMeridian'              => 'int',           //post
+            'toTimeMeridian'              => 'string',        //post
             'toTimeHour'                  => 'digits',        //post
-            'fromDate_Month'              => 'string',        //post
+            'fromDate_Month'              => 'int',           //post
             'fromDate_Day'                => 'digits',        //post
             'fromDate_Year'               => 'digits',        //post
-            'toDate_Month'                => 'string',        //post
+            'toDate_Month'                => 'int',           //post
             'toDate_Day'                  => 'digits',        //post
             'toDate_Year'                 => 'digits',        //post
             'fromTimeMinute'              => 'digits',        //post


=====================================
tiki-edit_blog.php
=====================================
@@ -13,10 +13,10 @@ $inputConfiguration = [
     [
         'staticKeyFilters'                => [
             'blogId'                      => 'int',          //post
-            'heading'                     => 'int',           //post
-            'post_heading'                => 'bool',          //post
+            'heading'                     => 'xss',           //post
+            'post_heading'                => 'xss',           //post
             'save'                        => 'bool',          //post
-            'preview'                     => 'int',           //post
+            'preview'                     => 'bool',          //post
             'public'                      => 'bool',          //post
             'allow_comments'              => 'bool',          //post
             'show_avatar'                 => 'bool',          //post


=====================================
tiki-edit_docs.php
=====================================
@@ -17,7 +17,7 @@ $inputConfiguration = [
             'fileId'                      => 'int',           //post
             'galleryId'                   => 'int',           //post
             'name'                        => 'string',        //post
-            'data'                        => 'none',          //post
+            'data'                        => 'string',        //post
             'description'                 => 'xss',           //post
             'edit'                        => 'bool',          //post
         ],


=====================================
tiki-edit_languages.php
=====================================
@@ -23,6 +23,7 @@ $inputConfiguration = [
             'maxRecords'                  => 'int',             //post
             'translate_all'               => 'bool',            //post
             'find'                        => 'string',          //post
+            'tran_reset'                  => 'bool',            //post
         ],
     ],
 ];



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

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