Skip to content

Commit eeee3b1

Browse files
committed
FOUR-29250 Document element-destination redirect risk; strip remember_token from Mustache context
- Add docblock in ProcessRequestToken for medium-risk redirect/Mustache behavior - Unset _user.remember_token in getElementDestinationMustacheContext (defense in depth) - Document in ConditionalRedirectService that normalizeDataForFeel changes comparison semantics
1 parent 74212c5 commit eeee3b1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ProcessMaker/Models/ProcessRequestToken.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,11 @@ private function getElementDestinationMustacheContext(): array
14661466

14671467
$context['APP_URL'] = config('app.url');
14681468

1469+
// Never expose remember_token to Mustache (defense in depth; DataManager/fallback may already strip it)
1470+
if (isset($context['_user']) && is_array($context['_user'])) {
1471+
unset($context['_user']['remember_token']);
1472+
}
1473+
14691474
// Normalize to plain arrays/scalars so Mustache resolves all keys (common PHP idiom)
14701475
$json = json_encode($context, JSON_THROW_ON_ERROR);
14711476
$normalized = json_decode($json, true, 512, JSON_THROW_ON_ERROR);

0 commit comments

Comments
 (0)