[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Tiki filters: Enhance and correct input filter types in tiki-list_*.php files
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <695d8869efe3a_2c59af63c1926e@gitlab-sidekiq-low-urgency-cpu-bound-v2-546464f4cd-ckcpz.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
e8716d91 by Moïse Nturubika at 2026-01-06T22:02:22+00:00
[ENH] Tiki filters: Enhance and correct input filter types in tiki-list_*.php files
---
* [FIX] Undo a deletion error
* [FIX] Resolve sort_mode conflicts with another MR
* [ENH] TIki filters: Files sanitization
See merge request tikiwiki/tiki!8781
- - - - -
6 changed files:
- tiki-list_banners.php
- tiki-list_blogs.php
- tiki-list_comments.php
- tiki-list_file_gallery.php
- tiki-list_invite.php
- tiki-list_posts.php
Changes:
=====================================
tiki-list_banners.php
=====================================
@@ -10,6 +10,7 @@ $inputConfiguration = [
'remove' => 'word', //post
'sort_mode' => 'word', //get
'offset' => 'int', //get
+ 'find' => 'string', //post
],
],
];
=====================================
tiki-list_blogs.php
=====================================
@@ -15,6 +15,7 @@ $inputConfiguration = [
'remove' => 'word', //post
'sort_mode' => 'word', //get
'offset' => 'int', //get
+ 'find' => 'string', //post
],
],
];
=====================================
tiki-list_comments.php
=====================================
@@ -16,7 +16,7 @@ $inputConfiguration = [
'findfilter_approved' => 'word', //post
'sort_mode' => 'word', //get
'offset' => 'int', //get
- 'find' => 'word', //post
+ 'find' => 'string', //post
],
'staticKeyFiltersForArrays' => [
'types' => 'string', //post
@@ -237,7 +237,7 @@ if (isset($_REQUEST['checked'])) {
if (isset($_REQUEST["sort_mode"])) {
$sort_mode = $_REQUEST["sort_mode"];
- $column_validity = TikiDb::get()->validateSortColumn('tiki_comments', $sort_mode);
+ $column_validity = TikiDb::get()->validateSortColumn('tiki_comments', $sort_mode);
if (! $column_validity) {
$sort_mode = 'commentDate_desc';
Feedback::error(tr('Invalid sort mode'));
=====================================
tiki-list_file_gallery.php
=====================================
@@ -15,7 +15,7 @@ use Tiki\Package\VendorHelper;
$inputConfiguration = [
[
'staticKeyFilters' => [
- 'find_other' => 'word', //post
+ 'find_other' => 'int', //post
'galleryId' => 'int', //get
'parentId' => 'int', //post
'view' => 'word', //get
@@ -41,7 +41,7 @@ $inputConfiguration = [
'sortdirection' => 'word', //post
'fname' => 'word', //post
'fdescription' => 'xss', //post
- 'data' => 'none', //get
+ 'data' => 'string', //get
'quota' => 'int', //post
'name' => 'string', //post
'description' => 'xss', //post
@@ -108,6 +108,9 @@ $inputConfiguration = [
'watch_object' => 'word', //get
'galleryName' => 'word', //get
'fgal_actions' => 'word', //get
+ 'detach' => 'bool', //get
+ 'duplicate' => 'bool', //post
+ 'watch_action' => 'word', //get
],
'staticKeyFiltersForArrays' => [
'cat_categories' => 'digits',
=====================================
tiki-list_invite.php
=====================================
@@ -17,7 +17,6 @@ $inputConfiguration = [
'only_success' => 'word', //post
'sort_mode' => 'word', //get
'offset' => 'int', //get
- 'find' => 'word', //post
],
],
];
=====================================
tiki-list_posts.php
=====================================
@@ -15,7 +15,7 @@ $inputConfiguration = [
'remove_x' => 'int', //get
'sort_mode' => 'word', //get
'offset' => 'int', //get
- 'find' => 'word', //post
+ 'find' => 'string', //post
'blogId' => 'int', //get
],
'staticKeyFiltersForArrays' => [
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e8716d91518dd6354cdcac9abfb833906967183e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e8716d91518dd6354cdcac9abfb833906967183e
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