Skip to content

Feature presidecms 2926 500 error when user uploads large file and hit validation error#1731

Open
Pixl8RusselCole wants to merge 4 commits intostablefrom
feature-PRESIDECMS-2926_500-error-when-user-uploads-large-file-and-hit-validation-error
Open

Feature presidecms 2926 500 error when user uploads large file and hit validation error#1731
Pixl8RusselCole wants to merge 4 commits intostablefrom
feature-PRESIDECMS-2926_500-error-when-user-uploads-large-file-and-hit-validation-error

Conversation

@Pixl8RusselCole
Copy link
Contributor

@Pixl8RusselCole Pixl8RusselCole commented Jan 19, 2026

Note

Strengthens session persistence by ensuring only serializable data is stored.

  • Adds cleanStruct and cleanArray in system/helpers/structUtils.cfm to recursively remove byte arrays and non-serializable values from structs/arrays
  • Updates SessionStorage.persist() to invoke $helpers.cleanStruct(storage) before SerializeJson
  • Adds StructUtilsTest.cfc unit test validating byte arrays are removed from nested structs/arrays

Written by Cursor Bugbot for commit f35e299. This will update automatically on new commits. Configure here.

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Test Results

    1 files  ±0    118 suites  +1   2m 51s ⏱️ +19s
1 830 tests +1  1 827 ✅ +1  3 💤 ±0  0 ❌ ±0 
1 833 runs  +1  1 830 ✅ +1  3 💤 ±0  0 ❌ ±0 

Results for commit f35e299. ± Comparison against base commit 9a92ef6.

♻️ This comment has been updated with latest results.


StructDelete( storage, "sessionId" );

for ( var key in storage.cbox_flash_scope ?: {} ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants