Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: Improve ViewHandler interface (OFBIZ-13179) #858

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

nmalin
Copy link
Contributor

@nmalin nmalin commented Nov 15, 2024

We extend AbstractViewHandler with a new method to override prepareViewContext. For each view handler implementation this will allow to control context used for rendering, applying Scriptlet token detection for security purpose.

A new class SecuredFreemarker has been created to manage freemarker specific controls, outside global SecurityUtil class.

We also add a new parameter secure-context (set true by default) to view-map xml element to indicate that this view allow unsecure rendering, this implies the view-map to required authentication.

Thanks to Gil Portenseigne for help

We extend *AbstractViewHandler* with a new method to override *prepareViewContext*.
For each view handler implementation this will allow to control context used for rendering, applying Scriptlet token detection for security purpose.

A new class *SecuredFreemarker* has been created to manage freemarker specific controls, outside global *SecurityUtil* class.

We also add a new parameter *secure-context* (set true by default) to view-map xml element to indicate that this view allow unsecure rendering, this implies the view-map to required authentication.

Thanks to Gil Portenseigne for help
Copy link

sonarcloud bot commented Nov 15, 2024

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.

1 participant