View Issue Details

IDProjectCategoryView StatusLast Update
5534Composrcataloguespublic2024-01-11 14:01
ReporterPDStig Assigned ToPDStig  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version10.0.44 
Fixed in Version10.0.45 
Summary5534: No server-side field validation for field hooks (catalogues)
DescriptionThere is no server-side validation when adding or editing catalogue entries. The only validation is JavaScript-side. But someone can modify or bypass the JS in their browser to force validation to pass, thereby resulting in the form getting submitted and the catalogue entry having invalid values.

This bug also exists in v11.
TagsNo tags attached.
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

admin

2024-01-07 03:45

administrator   ~8159

Automated response: No server-side field validation for field hooks (catalogues)

There is no server-side validation when adding or editing catalogue entries. The only validation is JavaScript-side. But someone can modify or bypass the JS in their browser to force validation to pass, thereby resulting in the form getting submitted and the catalogue entry having invalid values.

This fix adds required field validation on a high-level (wherever the hooks are called) and field-specific validation where it was missing in inputted_to_field_value.

admin

2024-01-07 03:45

administrator   ~8160

Fixed in git commit 7a460e1ec8 (https://gitlab.com/composr-foundation/composr/commit/7a460e1ec8 - link will become active once code pushed to GitLab)

A hotfix (a TAR of files to upload) has been uploaded to this issue. These files are made to the latest intra-version state (i.e. may roll in earlier fixes too if made to the same files) - so only upload files newer than what you have already. If there are files in a hot-fix that you don't have then they probably relate to addons that you don't have installed and should be skipped. Always take backups of files you are replacing or keep a copy of the manual installer for your version, and only apply fixes you need. These hotfixes are not necessarily reliable or well supported. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/).

PDStig

2024-01-07 03:48

administrator   ~8161

Do NOT use themes/default/javascript/checking.js in the hotfix; I accidentally committed test code.

PDStig

2024-01-11 14:01

administrator   ~8173

Another issue I forgot to mark resolved. This was implemented in v11 too a couple days ago. Not a perfect solution but it gets the job done.

Issue History

Date Modified Username Field Change
2024-01-07 00:55 PDStig New Issue
2024-01-07 00:55 PDStig Status Not Assigned => Assigned
2024-01-07 00:55 PDStig Assigned To => user4172
2024-01-07 03:48 PDStig Note Added: 0008161
2024-01-11 14:01 PDStig Status Assigned => Resolved
2024-01-11 14:01 PDStig Resolution open => fixed
2024-01-11 14:01 PDStig Note Added: 0008173