Moves checking OgnlValueStack.THROW_EXCEPTION_ON_FAILURE outside loop because it shouldn't throw exception on first failure while is trying all root objects.
Returns on first successful call because it's not rational and is confusing user to skip when user method successfully returns null as an actual result.
Fixes WW-4999 via honoring (devMode && logMissingProperties) for OgnlValueStack.THROW_EXCEPTION_ON_FAILURE and REPORT_ERRORS_ON_NO_PROP.
* include ref in path for StrutsApplicationResource as WW-5011 workaround
* add license to newly added xml files in previous commit
* WW-5011 include ref in path via .toURI().getPath()
* WW-5011 check protocol and not throw exception due to lazy file existence
* decrease log file size to pass travis build
- Made "constant" RELOADED static to save an initialization every time.
- Updated clearBundle(final String bundleName) method comment as it
seemed inaccurate, added debug log output when called.
- Introduced protected clearBundle(final String bundleName, Locale locale)
method for use by descendants, with debug log output when called.
- Introduced protected clearMissingBundlesCache() method for use by
descendants, with debug log when called.
- Correct missing verification in buildAllowedMethods()/loadGlobalAllowedMethods() that the nodes are
of type Node.TEXT_NODE (as buildResults() does).
- Made two class fields final, as suggested by IDE.
Note: Unlike some similar constructs in other header fields, media
type parameters do not allow whitespace (even "bad" whitespace)
around the "=" character.
Reference: https://tools.ietf.org/html/rfc7231#section-3.1.1.1
See also: WW-4958
* Proposed fix for WW-5029 for the 2.5.x branch:
- NOTE: If the PR is accepted please credit Maxime Clement for this change as they found
the issue, identified the probable cause/related details and opened the JIRA.
- Updated XWorkConfigurationProvider buildAllowedMethods(), loadGlobalAllowedMethods() so that
they now handle situations when a SAX parser produces multiple elements to represent the tag
body value.
- No changes to unit tests.
* Update commit to fix weakness identified by Maxime Clement:
- Implementation should now properly concatenate the node children values together (as a single unified string)
in both buildAllowedMethods(), loadGlobalAllowedMethods() - before generating the method Set to be added.
- Made some eligible variables final.
* Update commit to provide new unit tests:
- Added unit tests to confirm the fixes for buildAllowedMethods(), loadGlobalAllowedMethods()
- Added Mock DOM classes sufficient for these tests.
- Added unit tests to cover buildResults() and loadGlobalResults().
Proposed fix for WW-5028 for the 2.5.x branch:
- Disable printing stacktrace on exceptions by the Dispatcher by default.
- Printing stacktrace on exception is only enabled with devMode set to true, as suggested by L. Lenart.
- Now prints stacktrace on exception using LOG, as suggested by A. Mashchenko and the the JIRA reporter.
Log level set to debug as recommended by Y. Zamani.
- Added two additional unit tests for Dispatcher devMode and handleException states.
- NOTE: If the PR is accepted please credit Robert Hollencamp (Github @rhollencamp) for this change
as he found the issue, proposed a solution for 2.6 (master), and opened the JIRA.
- Updated HttpParameters, ActionMappingParametersInterceptor to prevent multi-level Parameter wrapping from occuring.
- Added a new ActionMappingParametersInterceptorTest to verify the fix.
- Fixes error 500 processing failures for double-submit results with TokenSessionStoreInterceptor processing
- Fix to InvocationSessionStore, new unit test confirming fix in InvocationSessionStoreTest
- Minor whitespace fix to TokenSessionStoreInterceptor
- This backport resulted from a review inspired/suggested by Y. Zamani in discussions for PR#334.
- Backports fix of error in testNullMethod().
- Backports applicable static access tests (static method access only), cleanup of unused imports.
- As with 2.6, it uses Y. Zamani's improved/enhanced reload mechanism.
1) Token examples. Examples 2 and 3 previously resulted in 403's upon submit (config issue).
2) Token examples. Example 4 resulted in error 500 when selected from the menu (FTL param type issue).
3) Validation examples. Examples quizBasic, quizClient and quizClientCss resulted in 404's when selected from menu (config issue).
4) File upload examples. Multiple file upload missing result page (list and array), added missing JSP. Added missing input results in configuration.
5) Add manual test for public constant access via expression (to If tag JSP).
Similar to PR#255 for 2.6.x.
* Fix for NPE issue discovered in WW-5004.
- Guard fix for a NPE that can arise under certain conditions, identified by A. Mashchenko.
* Fix for NPE issue discovered in WW-5004 (amended commit).
- Guard fix for a NPE that can arise under certain conditions, identified by A. Mashchenko.
- Requires the following elements to implement a fuller fix:
- Back-port relevant guard logic in ProxyUtil from master into 2.5.x to deal with the NPE.
- Update SecurityMemberAccess to block access to static fields.
- Upgrade to OGNL 3.1.22 (re-enables access to public static fields w/out access checks).
- Add unit test to confirm proper functionality of the fix.
- Correct missing entry in 4 test configuration XML files (needed for new unit test).
- Replaced literal injection parameter name for setStaticFieldAccessLevel in OgnlValueStackFactory with the appropriate constant.
Note: Even though a constant was defined in StrutsConstants, the value for the injection name in all places is the XWorkConstants.
It has to remain the same to avoid breaking anything.
- Made a private ConcurrentMap reference final, made initial sets immutable (consistency).
- Made sets for Accepted and Excluded patterns checkers immutable in 2 modules (consistency).
- Added @Override annotations missing from a few methods in 2 modules.
- Updated the 3 relevant unit tests to verify immutable states of various sets.
- Reverted the 6 modified files back to 2.5.19 baseline.
- Removed most of the logging added in PR#291.
- Left the added logging for the setExcludedPatterns and setAcceptedPatterns methods in their respective modules.
L. Lenart's comment indicated their benefit outweighs overhead (not something that changes often).
Made the if-else blocks consistent with preferred styling for the log blocks.
- Removed a dangling "/**" start comment tag with no proper close (and the whitespace between it and the next "/**"
in the OgnlValueStack module.
(Note: Amended previous commit)