Repository navigation
FOUR-34579 | Resolve Ticket Cache Drop and Parked Query Overwrites in ABE Enhancements - #9200
mcraeteisha wants to merge 2 commits into
Conversation
Prevent mismatched ABE tokens from consuming parked click data, and ensure fresh action parameters take precedence after login. Add regression tests for ticket reuse and successive clicks.
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit f618f82. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
QA server K8S was successfully deployed https://tenant-1.ci-6e41dba15a.engk8s.processmaker.net |
|
QA server K8S was successfully deployed https://tenant-1.ci-6e41dba15a.engk8s.processmaker.net |
eiresendez
left a comment
There was a problem hiding this comment.
Hi @mcraeteisha, I left a comment on the PR with a potential validation edge case I spotted during static review. Could you take a look and let me know if the finding makes sense to you?
Skip restoring a parked click whenever either action parameter is present, leaving partial and invalid values to validation. Add regression coverage for partial and array-valued queries.
eiresendez
left a comment
There was a problem hiding this comment.
No merge blockers found 👍
|
QA server K8S was successfully deployed https://tenant-1.ci-6e41dba15a.engk8s.processmaker.net |
|




Issue
Ticket: FOUR-34579
With Actions by Email Require Login, a leftover
abe_click_ticketcould delete a parked click when anotherupdate_variableURL was hit withoutabe_sig, so after login the short intended URL failed restore and returned validation errors instead of completing with the signed recipient. Separately, a second Approve/Reject click could be overwritten by an earlier parked query before re-parking, so after login the original action completed instead of the latest one.Root cause:
pullPendingAbeClickQueryusedCache::pullbefore confirmingabe_uuidownership, andrestoreAbeClickQueryreapplied parked values wheneverabe_sigwas missing—including fresh clicks that already carriedvarName/varValue.Solution
processmaker
TaskController::pullPendingAbeClickQuery: peek withCache::get, consume withCache::forgetonly whenabe_uuidmatches.TaskController::restoreAbeClickQuery: skip restore when the request already hasvarNameandvarValueso a later click parks its own action.TaskController::handleAbeVariableUpdate/resolveAbeVariableUpdateResponse: split for Sonar return-count compliance.TokenRepository::abeProcessModelFromTokenInstance: collapse null-safe chain for Sonar return-count compliance.tests/Feature/TaskControllerTest.php: addtestAbeClickTicketCacheSurvivesUuidMismatchandtestLaterAbeClickWithRequireLoginParksLatestAction.How To Test
Automated Tests
vendor/bin/phpunit --filter 'testRequireLoginPreservesSignedRecipientAndSetsIdentityMismatch|testMissingAbeClickQueryAfterFailedRestoreReturnsValidationError|testAbeClickTicketCacheSurvivesUuidMismatch|testLaterAbeClickWithRequireLoginParksLatestAction|testActionByEmailWithScreen' tests/Feature/TaskControllerTest.phpManual Tests
update_variableURL (or a short URL for another token) that still carries the leftoverabe_click_ticket. Log in and return via the original intended URL.- Expected: original parked click still completes; ticket cache for the matching ABE token is not dropped by the mismatched hit. Then click Approve, then Reject before login; after login the later action (
Reject) completes.ci:deploy
Code Review Checklist