You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InjectTemplateListener::injectTemplate uses different logic to determine template name based on action name than AbstractController::getMethodFromAction. I think that view name should be based on real action name instead of request data as it's possible to trigger action A and render view B instead of A.
I don't see any security problems when template names are used to determine template path automatically. Every scenario I found just ends in invalid template name when action has been executed.
Current behavior
InjectTemplateListener::injectTemplate uses action route parameter from URL. It generates view names which can be different for single controller action.
How to reproduce
Within default Laminas Framework configuration:
Visiting /my-controller/test will call testAction and render (...)/my-controller/test template. = OK
Visiting /my-controller/test%20 will call testAction and try to render (...)/my-controller/test template. = FAIL (space at the end)
Visiting /my-controller/teSt will call testAction and try to render (...)/my-controller/te-st template. = FAIL
Visiting /my-controller/te-st will call testAction and try to render (...)/my-controller/te-st template. = FAIL
Expected behavior
Action name used to generate view name should be filtered in the same way as it's filtered for determining method name within controller.
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
InjectTemplateListener::injectTemplate
uses different logic to determine template name based on action name thanAbstractController::getMethodFromAction
. I think that view name should be based on real action name instead of request data as it's possible to trigger action A and render view B instead of A.I don't see any security problems when template names are used to determine template path automatically. Every scenario I found just ends in invalid template name when action has been executed.
Current behavior
InjectTemplateListener::injectTemplate
usesaction
route parameter from URL. It generates view names which can be different for single controller action.How to reproduce
Within default Laminas Framework configuration:
/my-controller/test
will calltestAction
and render(...)/my-controller/test
template. = OK/my-controller/test%20
will calltestAction
and try to render(...)/my-controller/test
template. = FAIL (space at the end)/my-controller/teSt
will calltestAction
and try to render(...)/my-controller/te-st
template. = FAIL/my-controller/te-st
will calltestAction
and try to render(...)/my-controller/te-st
template. = FAILExpected behavior
Action name used to generate view name should be filtered in the same way as it's filtered for determining method name within controller.
The text was updated successfully, but these errors were encountered: