[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Align input filters across CMS, Quizzes, Structures, Multilingual, DCS & Diagram

"Elifeleti Mukisa Dan \(@Danelif\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6901c3e3cf23a_2c1671a641009b@gitlab-sidekiq-low-urgency-cpu-bound-v2-85cf4bdd85-9nzv9.mail>

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


Commits:
d5a9078b by Doddy MATABARO at 2025-10-29T07:28:05+00:00
[FIX] Align input filters across CMS, Quizzes, Structures, Multilingual, DCS & Diagram
---
* [FIX] Update input validation types for galleryId and fileId fields

* [FIX] Update input validation types for 'type' and 'translation_name' fields

* [FIX] Update input validation type for topic name field

* [FIX] Update input validation types for submission fields

* [FIX] Update input validation types for page_ref_id, watch_action, watch_object, pageAlias, name, move_node, find_objects, and cat_categories

* [FIX] Update input validation types for quiz form fields

* [FIX] Update input validation types for quiz results parameters

* [FIX] Update input validation types for quiz question parameters

* [FIX] Update input validation types for question options

* [FIX] Update filters  types for  programmed content  handling

See merge request tikiwiki/tiki!8742

- - - - -


10 changed files:

- tiki-edit_programmed_content.php
- tiki-edit_question_options.php
- tiki-edit_quiz.php
- tiki-edit_quiz_questions.php
- tiki-edit_quiz_results.php
- tiki-edit_structure.php
- tiki-edit_submission.php
- tiki-edit_topic.php
- tiki-edit_translation.php
- tiki-editdiagram.php


Changes:

=====================================
tiki-edit_programmed_content.php
=====================================
@@ -14,10 +14,10 @@ $inputConfiguration = [
             'contentId'                   => 'int',            //post
             'remove'                      => 'int',            //post
             'save'                        => 'bool',           //post
-            'content_type'                => 'string',         //post
-            'page_name'                   => 'pagemame',       //post
+            'content_type'                => 'word',         //post
+            'page_name'                   => 'pagename',       //post
             'data'                        => 'none',           //post
-            'Time_Meridian'               => 'int',            //post
+            'Time_Meridian'               => 'alpha',            //post
             'Time_Hour'                   => 'int',            //post
             'Time_Minute'                 => 'int',            //post
             'Date_Month'                  => 'int',            //post
@@ -25,9 +25,9 @@ $inputConfiguration = [
             'Date_Year'                   => 'int',            //post
             'pId'                         => 'int',            //post
             'edit'                        => 'int',            //post
-            'sort_mode'                   => 'alpha',          //get
+            'sort_mode'                   => 'alnumdash',          //get
             'offset'                      => 'int',            //get
-            'find'                        => 'alpha',          //post
+            'find'                        => 'striptags',          //post
         ],
     ],
 ];


=====================================
tiki-edit_question_options.php
=====================================
@@ -17,10 +17,10 @@ $inputConfiguration = [
             'remove'                      => 'int',            //post
             'save'                        => 'bool',           //post
             'optionText'                  => 'xss',            //post
-            'points'                      => 'string',         //post
-            'sort_mode'                   => 'alpha',          //get
+            'points'                      => 'float',         //post
+            'sort_mode'                   => 'alnumdash',          //get
             'offset'                      => 'int',            //get
-            'find'                        => 'alpha',          //post
+            'find'                        => 'striptags',          //post
         ],
     ],
 ];


=====================================
tiki-edit_quiz.php
=====================================
@@ -10,32 +10,33 @@ $inputConfiguration = [
             'quizId'                      => 'int',            //post
             'questionsPerPage'            => 'int',            //post
             'save'                        => 'bool',           //post
-            'publish_Meridian'            => 'digits',         //post
-            'publish_Hour'                => 'digits',         //post
-            'expire_Meridian'             => 'digits',         //post
-            'expire_Hour'                 => 'digits',         //post
-            'publish_Minute'              => 'digits',         //post
-            'publish_Month'               => 'digits',         //post
-            'publish_Day'                 => 'digits',         //post
-            'publish_Year'                => 'digits',         //post
-            'expire_Minute'               => 'digits',         //post
-            'expire_Month'                => 'digits',         //post
-            'expire_Day'                  => 'digits',         //post
-            'expire_Year'                 => 'digits',         //post
+            'publish_Meridian'            => 'alpha',         //post
+            'publish_Hour'                => 'int',         //post
+            'expire_Meridian'             => 'alpha',         //post
+            'expire_Hour'                 => 'int',         //post
+            'publish_Minute'              => 'int',         //post
+            'publish_Month'               => 'int',         //post
+            'publish_Day'                 => 'int',         //post
+            'publish_Year'                => 'int',         //post
+            'expire_Minute'               => 'int',         //post
+            'expire_Month'                => 'int',         //post
+            'expire_Day'                  => 'int',         //post
+            'expire_Year'                 => 'int',         //post
             'canRepeat'                   => 'bool',           //get
             'storeResults'                => 'bool',           //post
             'immediateFeedback'           => 'bool',           //post
-            'showAnswers'                 => 'alpha',          //get
+            'showAnswers'                 => 'bool',          //get
             'shuffleQuestions'            => 'bool',           //post
+            'shuffleAnswers'              => 'bool',
             'timeLimited'                 => 'bool',           //post
-            'name'                        => 'string',         //post
+            'name'                        => 'text',         //post
             'description'                 => 'xss',            //get
-            'timeLimit'                   => 'digits',         //post
+            'timeLimit'                   => 'int',         //post
             'passingperct'                => 'int',         //post
             'remove'                      => 'int',            //post
-            'sort_mode'                   => 'word',          //get
+            'sort_mode'                   => 'alnumdash',          //get
             'offset'                      => 'int',            //get
-            'find'                        => 'alpha',          //get
+            'find'                        => 'striptags',          //get
             'cookietab'                   => 'int',            //get - for tab persistence
         ],
     ],


=====================================
tiki-edit_quiz_questions.php
=====================================
@@ -18,15 +18,15 @@ $inputConfiguration = [
             'question'                    => 'text',           //post
             'remove'                      => 'int',            //post
             'save'                        => 'bool',           //post
-            'questionType'                => 'string',         //post
-            'position'                    => 'string',         //post
+            'questionType'                => 'word',         //post
+            'position'                    => 'int',         //post
             'import'                      => 'bool',           //post
             'input_data'                  => 'text',           //post
             'useQuestion'                 => 'bool',           //post
             'usequestionid'               => 'int',            //post
-            'sort_mode'                   => 'text',          //get
+            'sort_mode'                   => 'alnumdash',          //get
             'offset'                      => 'int',            //get
-            'find'                        => 'alpha',          //post
+            'find'                        => 'striptags',          //post
         ],
     ],
 ];


=====================================
tiki-edit_quiz_results.php
=====================================
@@ -15,12 +15,12 @@ $inputConfiguration = [
             'resultId'                    => 'int',            //post
             'remove'                      => 'int',            //post
             'save'                        => 'bool',           //post
-            'fromPoints'                  => 'digits',         //post
-            'toPoints'                    => 'digits',         //post
+            'fromPoints'                  => 'float',         //post
+            'toPoints'                    => 'float',         //post
             'answer'                      => 'xss',            //post
-            'sort_mode'                   => 'string',         //get
+            'sort_mode'                   => 'alnumdash',         //get
             'offset'                      => 'int',            //get
-            'find'                        => 'alpha',          //post
+            'find'                        => 'striptags',          //post
         ],
     ],
 ];


=====================================
tiki-edit_structure.php
=====================================
@@ -18,16 +18,16 @@ $inputConfiguration = [
             'begin'                       => 'bool',           //post
             'rremove'                     => 'int',            //get
             'page'                        => 'pagename',       //post
-            'page_ref_id'                 => 'digits',         //post
+            'page_ref_id'                 => 'int',         //post
             'sremove'                     => 'int',            //get
-            'watch_action'                => 'string',         //post
-            'watch_object'                => 'digits',         //post
+            'watch_action'                => 'alpha',         //post
+            'watch_object'                => 'int',         //post
             'create'                      => 'bool',           //post
-            'pageAlias'                   => 'string',         //post
+            'pageAlias'                   => 'text',         //post
             'after_ref_id'                => 'int',            //post
-            'name'                        => 'string',         //post
-            'move_node'                   => 'string',         //post
-            'find_objects'                => 'string',         //post
+            'name'                        => 'pagename',         //post
+            'move_node'                   => 'int',         //post
+            'find_objects'                => 'striptags',         //post
             'recategorize'                => 'bool',           //post
             'cat_categorize'              => 'bool',           //post
             'cat_override'                => 'bool',           //post
@@ -35,8 +35,8 @@ $inputConfiguration = [
             'offset'                      => 'int',            //get
         ],
         'staticKeyFiltersForArrays' => [
-            'name2'                 => 'string',        //post
-            'cat_categories'        => 'string',        //post
+            'name2'                 => 'pagename',        //post
+            'cat_categories'        => 'int',        //post
         ],
     ],
 ];


=====================================
tiki-edit_submission.php
=====================================
@@ -15,39 +15,41 @@ $inputConfiguration = [
             'allowhtml'                     => 'bool',            //post
             'subId'                         => 'int',             //post
             'topicId'                       => 'int',             //post
-            'type'                          => 'string',          //post
+            'type'                          => 'alnumdash',          //post
             'previewId'                     => 'int',             //post
             'imageIsChanged'                => 'bool',            //post
             'templateId'                    => 'int',             //post
-            'preview'                       => 'int',             //post
+            'preview'                       => 'bool',             //post
             'body'                          => 'xss',             //post
-            'translationOf'                 => 'digits',          //post
+            'translationOf'                 => 'int',          //post
             'save'                          => 'bool',            //post
             'submitarticle'                 => 'bool',            //post
-            'publish_Hour'                  => 'digits',          //post
-            'publish_Minute'                => 'digits',          //post
-            'publish_Month'                 => 'digits',          //post
-            'publish_Day'                   => 'digits',          //post
-            'publish_Year'                  => 'digits',          //post
-            'publish_Meridian'              => 'string',          //post
-            'title'                         => 'string',          //post
-            'authorName'                    => 'string',          //post
+            'publish_Hour'                  => 'int',          //post
+            'publish_Minute'                => 'int',          //post
+            'publish_Month'                 => 'int',          //post
+            'publish_Day'                   => 'int',          //post
+            'publish_Year'                  => 'int',          //post
+            'publish_Meridian'              => 'alpha',          //post
+            'title'                         => 'text',          //post
+            'authorName'                    => 'text',          //post
             'useImage'                      => 'bool',            //post
             'isfloat'                       => 'bool',            //post
-            'image_data'                    => 'striptags',       //post
-            'topline'                       => 'string',          //post
-            'subtitle'                      => 'string',          //post
-            'linkto'                        => 'string',          //post
-            'image_caption'                 => 'string',          //post
-            'image_name'                    => 'string',          //post
-            'image_type'                    => 'string',          //post
-            'image_size'                    => 'digits',          //post
-            'image_x'                       => 'digits',          //post
-            'image_y'                       => 'digits',          //post
-            'rating'                        => 'digits',          //post
+            'image_data'                    => 'none',       //post
+            'topline'                       => 'text',          //post
+            'subtitle'                      => 'text',          //post
+            'linkto'                        => 'text',          //post
+            'image_caption'                 => 'text',          //post
+            'image_name'                    => 'text',          //post
+            'image_type'                    => 'text',          //post
+            'image_size'                    => 'text',          //post
+            'image_x'                       => 'text',          //post
+            'image_y'                       => 'text',          //post
+            'rating'                        => 'text',          //post
             'heading'                       => 'xss',             //post
-            'freetag_string'                => 'string',          //post
+            'freetag_string'                => 'text',          //post
             'recategorize'                  => 'bool',            //post
+            'lang'                          => 'alnumdash',          //post
+            'image_alt'                      => 'text',          //post
         ],
     ],
 ];


=====================================
tiki-edit_topic.php
=====================================
@@ -11,7 +11,7 @@ $inputConfiguration = [
         'staticKeyFilters'                => [
             'topicid'                     => 'int',              //post
             'edittopic'                   => 'bool',             //post
-            'name'                        => 'string',           //post
+            'name'                        => 'text',           //post
             'email'                       => 'email',            //post
         ],
     ],


=====================================
tiki-edit_translation.php
=====================================
@@ -13,10 +13,10 @@ $inputConfiguration = [
         'staticKeyFilters'                => [
             'id'                     => 'int',              //post
             'page'                   => 'pagename',         //post
-            'type'                   => 'string',           //post
+            'type'                   => 'text',           //post
             'langpage'               => 'lang',             //post
             'target_lang'            => 'lang',             //post
-            'translation_name'       => 'string',           //post
+            'translation_name'       => 'text',           //post
         ],
     ],
 ];


=====================================
tiki-editdiagram.php
=====================================
@@ -7,9 +7,14 @@ $inputConfiguration = [
         'staticKeyFilters'                => [
             'galleryId'                   => 'int',          //post
             'newDiagram'                  => 'bool',         //post
-            'fileName'                    => 'int',          //post
+            'fileName'                    => 'text',          //post
             'fileId'                      => 'int',          //post
             'template'                    => 'int',          //post
+            'page'                        => 'pagename',     //post
+            'xml'                         => 'none',         //post (base64/XML)
+            'index'                       => 'int',          //post
+            'compressXmlParam'            => 'bool',         //post
+            'compressXml'                 => 'alpha',        //post ("true"/"false")
         ],
     ],
 ];



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

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