Commit Graph

1494 Commits

Author SHA1 Message Date
yilinwang fb49bc4705 classMethods 2020-12-07 04:02:14 -06:00
yilinwang 40d529c439 sort getMethods 2020-12-07 02:44:51 -06:00
Lukasz Lenart b4bc5dcf75 WW-5078 Removes support for <xwork> DTDs 2020-11-29 15:51:18 +01:00
Lukasz Lenart 5186d348d5 Merge pull request #447 from apache/WW-5095-cherry-pick
[WW-5095] Cherry picks changes from 2-5-x branch
2020-11-20 07:45:55 +01:00
Lucas Cabral 0339ff4550 Fix meaningless close 2020-11-17 19:04:53 -03:00
Lukasz Lenart 8bbe1949e1 Avoids recursion in tags 2020-11-13 19:31:41 +01:00
Lukasz Lenart a6cd7a0c25 WW-5095 Sets ActionMapping when preparing a test nv 2020-11-13 18:51:32 +01:00
Lukasz Lenart f2a3c3955a Merge pull request #434 from salcho/post-ww-5083
Refactoring Nonce Propagation in Struts Tags for CSP
2020-09-21 10:03:23 +02:00
Ecenaz Ozmen 62424ef30c Refactoring script and link elements for CSP nonce propagation 2020-08-31 11:39:57 +03:00
Aleksandr Mashchenko 6210afa747 Merge pull request #430 from salcho/post-ww-5083
WW-5084: Add Content Security Policy support to Struts
2020-08-30 23:37:16 +03:00
JCgH4164838Gh792C124B5 cb3ca4b311 Initial attempt to fix OSGi Plugin issues discovered during examination of
WW-5075.
- Draws on PR#427 and utilizes similar code, but updated for JDK8.
- Updated OSGi plugin dependencies to OSGi R7.
- Indication is that the OSGi Plugin has been failing since Struts 2.3.4.
- Applied fix to ResourceFinder to restore 2.3.x logic that was broken in
  2.5.x.
- Implemented changes to restore OSGi Plugin functionality for 2.6.x.
- Applied changes to the OSGi Admin Bundle to function under 2.6.x.
- Applied changes to the OSGi Demo Bundle to function under 2.6.x.
- Updated the OSGi Admin Bundle JS libraries and related CSS to newer
  versions.
- Added new unit tests for the OSGi plugin.
- The OSGi plugin will only function properly with exploded/expanded WAR
  files.
- BundlePackageLoader changes suggested by L. Lenart (from PR#427).
- FelixOsgiHost changes to better handle Felix bundle cache location
  processing (Windows and Linux).
- FelixOsgIHost test modified to not fail if felix-cache directory
  cannot be created (warn only) to avoid failing the whole build.
- FelixOsgIHost test modified to not fail if felix-cache directory
  bundle load issues arise (warn only) to avoid failing the whole build.
2020-08-21 16:04:19 -04:00
gchatz22 4d8bec5d0a Cspinterceptor (#2)
Support for CSP in Struts 2:

- Implements a CSP Interceptor that adds a nonce-based, strict-dynamic policy to HTTP responses.
- Implements custom JSP and FTL <script> tags that add nonces to script blocks automatically. This makes these tags compatible with CSP with minimal refactoring.
- Implements an extensible action that can be used to collect CSP reports out of the box. This behaviour is extensible, so developers can customise the processing of CSP reports. 

Co-authored-by: Ecenaz Jen Ozmen <eo2419@columbia.edu>
Co-authored-by: Giannis Chatziveroglou <giannisc@google.com>
Co-authored-by: Sal <salchoman@gmail.com>
2020-07-28 15:52:50 +02:00
JCgH4164838Gh792C124B5 d29c2f6161 Minor post WW-5030 Cleanup:
- Correction/fix for test within testMockPortletSession(), following
recent changes.
- Fix TestMockMultipartFile.isEmpty() bug in both original logic and recent
changes.
2020-05-16 14:24:55 -04:00
Lukasz Lenart 91d4ab553e Fixes lastAccessedTime not modified once session was invalidated 2020-05-16 08:54:29 +02:00
Lukasz Lenart 0129d30abf Merge pull request #397 from apache/action-context-boost
[WW-4789] [WW-3788] ActionContext refactoring
2020-05-04 07:06:32 +02:00
JCgH4164838Gh792C124B5 a6711251a6 Proposed WW-5074 Fix:
- Exclude ASM 3.3.1 from inclusion as a dependency for commons-digester3
  (also mark commons-digester3 as optional dependency since it is only
  listed to allow the exclusion).
- Provide explicit test dependency of ASM 3.3.1 for portlet-plugin
  (otherwise its jmock tests are unable to execute).
2020-05-03 12:58:37 -04:00
Lukasz Lenart b96509f077 Merge branch 'master' into action-context-boost 2020-05-03 12:08:29 +02:00
Lukasz Lenart 12539edf5a Merge pull request #406 from apache/WW-5070-root-action-model
[WW-5070] Adds more sophisticated logic to search for the Root
2020-05-03 12:01:29 +02:00
Lukasz Lenart 158b1d4fde Merge pull request #229 from sdutry/WW-4796
WW-4796 Rename springconstants to have a uniform naming pattern
2020-05-01 07:10:29 +02:00
Lukasz Lenart 0cf39a97f0 WW-4789 WW-3788 Cleans up code & JavaDocs formatting 2020-04-28 08:19:20 +02:00
Lukasz Lenart 1e1443871b WW-4043 Adds additional function to provide encoding 2020-04-28 07:49:36 +02:00
Lukasz Lenart d826efb9d0 WW-5070 Re-phrases JavaDoc for setRoot() method 2020-04-27 08:20:39 +02:00
Lukasz Lenart 48435c4209 WW-5070 Uses else if to avoid double operation on stack 2020-04-27 08:19:29 +02:00
Lukasz Lenart 333f781207 WW-5070 Generates a new serialVersionUID 2020-04-27 08:17:35 +02:00
Lukasz Lenart 592c942c76 WW-4043 Moves TestUtils into junit-plugin 2020-04-26 09:31:18 +02:00
Lukasz Lenart 19c71ff153 WW-5070 Adds more sophisticated logic to search for the Root 2020-04-25 09:24:36 +02:00
Lukasz Lenart f071c9d0ed Reverse merges master 2020-04-21 20:42:15 +02:00
Lukasz Lenart 2f27e45ef4 WW-4789 WW-3788 Marks LOCALE as deprecated on behalf using helper methods 2020-04-21 20:27:11 +02:00
JCgH4164838Gh792C124B5 9d0a6a80ad Proposed WW-5068 change.
------
Proposed list of library version updates:
---
    cdi-api 1.0-SP4 -> 1.2
    weld-core 1.0.1-SP4 -> 2.2.16.SP1
    weld-se 1.0.1-Final -> weld-se-core 2.2.16.SP1
    htmlunit 2.27.0 and 2.37.0 -> 2.39.0
    slf4j-api 1.7.29 -> 1.7.30
    slf4j-simple 1.7.29 -> 1.7.30
    log4j2 2.12.1 - > 2.13.1
    jackson 2.10.1 -> 2.10.3
    ognl 3.2.12 -> 3.2.14
    asm 7.2 -> 7.3.1
    spring 4.3.25.RELEASE -> 4.3.26.RELEASE
    fluido-skin 1.8 -> 1.9
    freemarker 2.3.28 -> 2.3.30
    org.apache.felix.main 4.6.1 -> 6.0.3
    velocity 2.1 -> 2.2
    junit 4.12 -> 4.13
    easymock 3.5.1 -> 4.2
    javax.el 3.0.1-b10 -> 3.0.1-b11
    jstl 1.1.2 -> 1.2
    tomcat-jasper 8.5.37 -> 8.5.53
    tomcat-api 8.5.37 -> 8.5.53
    tomcat-juli 8.5.37 -> 8.5.53
    commons-lang3 3.9 -> 3.10
    assertj-core 2.9.1 -> 3.15.0
    mockito-core 2.23.0 -> 3.3.3   (required exclusion for objenesis)
    testng 5.14.10 -> 7.1.0
    juneau-marshall 7.2.2 -> 8.1.3
    validation-api 1.1.0.Final -> 2.0.1.Final
    hibernate-validator 5.4.3.Final -> 6.1.2.Final
    jaxb-impl 2.3.1 -> 2.3.2
---
Proposed list of Maven plugin version updates:
---
    maven-project-info-reports-plugin 2.7 -> 3.0.0
    updateimpact-maven-plugin 1.0.10 -> 1.0.12
    maven-surefire-plugin 2.22.2 -> 3.0.0-M4
    jacoco-maven-plugin 0.8.4 - > 0.8.5
    maven-war-plugin 3.2.2 -> 3.2.3
    maven-bundle-plugin 3.5.0 -> 4.2.1
    maven-dependency-plugin 3.1.1 -> 3.1.2
    dependency-check-maven 5.2.4 -> 5.3.2
    maven-enforcer-plugin 3.0.0-M2 -> 3.0.0-M3
    maven-failsafe-plugin 2.22.2 -> 3.0.0-M4
    maven-site-plugin 3.8.2 -> 3.9.0
    doxia-core 1.9 -> 1.9.1
    doxia-module-markdown 1.9 -> 1.9.1
---
2020-04-18 18:40:21 -04:00
Lukasz Lenart adcc67d9dc WW-4789 WW-3788 Marks VALUE_STACK, APPLICATION and SESSION as deprecated on behalf using helper methods 2020-04-13 17:24:16 +02:00
Lukasz Lenart c253b7f480 WW-4789 WW-3788 Marks CONTAINER as deprecated on behalf using helper methods 2020-04-10 19:39:10 +02:00
Lukasz Lenart 8e6815e115 WW-4789 WW-3788 Stops using get() 2020-04-08 08:22:00 +02:00
Lukasz Lenart 273776e13b WW-4789 WW-3788 Introduces helper methods to allow build fluent API 2020-04-07 07:59:11 +02:00
Lukasz Lenart dfda16d743 WW-4789 WW-3788 Introduces helper methods to allow build fluent API 2020-04-05 17:48:59 +02:00
Lukasz Lenart 81b069b3f1 WW-4789 WW-3788 Adjusts after rebase 2020-04-05 07:46:56 +02:00
Lukasz Lenart 1bfa1ce6d1 WW-4789 WW-3788 Adds instance bind() to simplify bind operation 2020-04-05 07:46:56 +02:00
Lukasz Lenart 1a8c751b9a WW-4789 WW-3788 Uses bind() instead of bound() 2020-04-05 07:46:56 +02:00
Lukasz Lenart f4aa4ee09a WW-4789 WW-3788 ActionContext refactoring 2020-04-05 07:46:56 +02:00
Lukasz Lenart a09ec6298c Drops duplicated dependency 2020-04-04 10:00:14 +02:00
JCgH4164838Gh792C124B5 c9ac74d0a1 Correction for previous commit message. There was a typo which should have
read: "copies one interface from
  org.springframework.mock.web.portlet.multipart" (not
  "org.apache.struts2.mock.web.portlet" which was incorrect).

Refactor (rename) junit-portlet plugin to portlet-mocks plugin.
- Moved StrutsPortletTestCase from the portlet plugin into the junit plugin
 (same package name).
- Added optional dependencies to the junit plugin for the portlet plugin
  and mocks plugin.
- Duplicated StrutsTestCase from the junit plugin with a new name
  StrutsTestCasePortletTests that exists within a test scope only.
  This was done to eliminate a dendency cycle between junit and portlet
  plugins during refactoring.
- Updated the portlet plugin unit tests to use StrutsTestCasePortletTests
  internally instead of StrutsTestCase from the junit plugin.
- Removed junit plugin dependency for portlets plugin, added test scope
  dependency for portlet-mocks plugin.
- Made StrutsSpringPortletMockObjectsTest depend only on TestCase.
- Removed unneeded dependencies from portlet-mocks pom.

Amended commit multiple times: Missed plugins pom.xml change, forgot to
drop StrutsPortletTestCase from portlet plugin (local repository).
2020-03-28 14:26:48 -04:00
JCgH4164838Gh792C124B5 000f7280d9 Fix for test running on JDK 9+. If using Spring 4.x mock objects the
MockServletContext has a dependency on javax.activation that causes a
java.lang.NoClassDefFoundError.
- Test updated to allow the single call that triggers this in JDK9+
to continue as long as the class not found is FileTypeMap (expected).
2020-03-22 15:37:20 -04:00
JCgH4164838Gh792C124B5 ec3532f30a Proposed implementation to address WW-5030.
Introduce new junit-portlet plugin.
- Utilizes a copy of org.springframework.mock.web.portlet package from
  Spring 4.3.x, refactored to org.apache.struts2.mock.web.portlet.  Also
  copies one interface from org.apache.struts2.mock.web.portlet.  The
  package-info.java files identify the package renaming.
- Provides test cases for the mock objects.
- Modifies the portlet plugin to use the junit-portlet plugin as a
  dependency.  Adds a small boundary case fix for PortletRequestMap.
2020-03-22 13:42:47 -04:00
Lukasz Lenart 9053c84d50 Merge pull request #394 from apache/WW-5047-new-velocity
[WW-5047] Upgrades to VelocityEngine 2.1 and VelocityTools 3.0
2020-02-24 09:36:11 +01:00
Lukasz Lenart d5bc76d772 WW-5047 Updates JavaDoc to match with new behaviour 2020-02-23 11:05:53 +01:00
Lukasz Lenart 35aae077c8 WW-5047 Marks previous constructors as deprecated 2020-02-23 10:55:42 +01:00
Lukasz Lenart 6da16931ef WW-5047 Lowers log level to debug 2020-02-01 16:45:30 +01:00
Lukasz Lenart 71d4a7be3b WW-5047 Upgrades to VelocityEngine 2.1 and VelocityTools 3.0 2020-02-01 12:49:01 +01:00
Lukasz Lenart 2c02100c29 WW-5054 Fixes links in config-browser 2020-01-12 12:08:59 +01:00
Lukasz Lenart a456b1fdd5 WW-5049 Reverts to static final as this will be refactored anyway 2019-12-29 09:10:08 +01:00
Lukasz Lenart 9c1b0cf1c2 WW-5049 Supports bean-selection via Java config 2019-12-29 09:10:08 +01:00