Feature presidecms 2926 500 error when user uploads large file and hit validation error#1731
Conversation
…oads-large-file-and-hit-validation-error'.
|
|
||
| StructDelete( storage, "sessionId" ); | ||
|
|
||
| for ( var key in storage.cbox_flash_scope ?: {} ) { |
There was a problem hiding this comment.
I think the idea of this is right, but is there a more unilateral way here? i.e. Inspect the flash scope and detect binary content - then remove it with a warning logged, rather than predicting a particular pattern?
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 17
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| ArrayDeleteAt( arguments.arr, i ); | ||
| } | ||
|
|
||
| ArrayDelete( arguments.arr, i ); |
There was a problem hiding this comment.
Wrong array deletion function causes data loss
High Severity
The cleanArray function uses ArrayDelete(arr, i) at line 65, which deletes elements matching the VALUE i (the loop counter) rather than deleting at index i. This causes incorrect deletion behavior and potential data loss when arrays contain numeric values equal to their indices. Additionally, line 62 creates a redundant deletion for byte arrays that executes before line 65, leading to double-deletion attempts. The pattern should match cleanStruct which only deletes once at the end.
Note
Strengthens session persistence by ensuring only serializable data is stored.
cleanStructandcleanArrayinsystem/helpers/structUtils.cfmto recursively remove byte arrays and non-serializable values from structs/arraysSessionStorage.persist()to invoke$helpers.cleanStruct(storage)beforeSerializeJsonStructUtilsTest.cfcunit test validating byte arrays are removed from nested structs/arraysWritten by Cursor Bugbot for commit f35e299. This will update automatically on new commits. Configure here.