-
Notifications
You must be signed in to change notification settings - Fork 817
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
WW-5406 Ensure Action excluded patterns are reinjected #910
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,8 @@ public class StrutsPrepareFilter implements StrutsStatics, Filter { | |
protected static final String REQUEST_EXCLUDED_FROM_ACTION_MAPPING = StrutsPrepareFilter.class.getName() + ".REQUEST_EXCLUDED_FROM_ACTION_MAPPING"; | ||
|
||
protected PrepareOperations prepare; | ||
|
||
@Deprecated | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please document why it's deprecated and what to use instead. Also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep let me rectify There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can have one general ticket to remove all the deprecated options, just to be sure we won't miss this one at some point (so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed and created this general issue - WW-5411 |
||
protected List<Pattern> excludedPatterns; | ||
|
||
public void init(FilterConfig filterConfig) throws ServletException { | ||
|
@@ -53,7 +55,7 @@ public void init(FilterConfig filterConfig) throws ServletException { | |
dispatcher = init.initDispatcher(config); | ||
|
||
prepare = createPrepareOperations(dispatcher); | ||
// Note: Currently, excluded patterns are not refreshed following an XWork config reload | ||
|
||
this.excludedPatterns = init.buildExcludedPatternsList(dispatcher); | ||
|
||
postInit(dispatcher, filterConfig); | ||
|
@@ -102,7 +104,7 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) | |
boolean didWrap = false; | ||
try { | ||
prepare.trackRecursion(request); | ||
if (prepare.isUrlExcluded(request, excludedPatterns)) { | ||
if (prepare.isUrlExcluded(request)) { | ||
request.setAttribute(REQUEST_EXCLUDED_FROM_ACTION_MAPPING, true); | ||
} else { | ||
request.setAttribute(REQUEST_EXCLUDED_FROM_ACTION_MAPPING, false); | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's getting crowd'y here, what about moving all the injectable options into
DispatcherOptions
? It doesn't have to happen now, but I can create a ticket to address that laterThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I think that's a fair call, I'll create an issue for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WW-5410