Fix coco 4672 template processor race condition#39
Open
vbillard91 wants to merge 5 commits intodevelop-b2schoolfrom
Open
Fix coco 4672 template processor race condition#39vbillard91 wants to merge 5 commits intodevelop-b2schoolfrom
vbillard91 wants to merge 5 commits intodevelop-b2schoolfrom
Conversation
juniorode
requested changes
Oct 13, 2025
src/main/java/fr/wseduc/webutils/http/ProcessTemplateContext.java
Outdated
Show resolved
Hide resolved
| { | ||
| if (resourceName != null && !resourceName.trim().isEmpty()) | ||
| public void processTemplateWithLambdas(ProcessTemplateContext context, Handler<Writer> handler) { | ||
| context.lambdas(getLambdasFromRequest(context.request())); |
Contributor
There was a problem hiding this comment.
En passant par public void renderTemplateView(final HttpServerRequest request, JsonObject params, String resourceName, Reader r, final int status, Map<String, Mustache.Lambda> lambdas) { j'ai l'impression qu'on fait 2 fois le boulot de getLambdasFromRequest
juniorode
approved these changes
Oct 13, 2025
c4ba65d to
10ba9a4
Compare
d555e94 to
203bc65
Compare
17a826a to
257a49a
Compare
257a49a to
c234eb8
Compare
c234eb8 to
c8adcd0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Les TemplateProcessor largement utilisés dans le code ne sont pas thread safe au niveau des Lambda. On pourrait donc avoir des mélanges entre les paramètres de plusieurs utilisateurs lors de la génération de mail / notification / carte timeline etc… entre la langue, l’host, le thème ou le domaine => refactoring partiel pour corriger le problème. On conserve les anciennes API pour la retrocompatibilité avec les divers modules
Fixes
https://edifice-community.atlassian.net/browse/COCO-4672
Type of change
Please check options that are relevant.