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

WW-5352 Repackage ParametersInterceptor and related classes #829

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

kusalk
Copy link
Member

@kusalk kusalk commented Jan 3, 2024

WW-5352

In preparation for new parameter annotation mechanism

@kusalk kusalk force-pushed the WW-5352-parameter-annotation branch from f7fba1e to 7bd238c Compare January 3, 2024 03:50
*/
public interface NoParameters extends com.opensymphony.xwork2.interceptor.NoParameters {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverse the delegations for easier deletion of deprecated classes

@kusalk kusalk force-pushed the WW-5352-parameter-annotation branch from 7bd238c to 4698733 Compare January 3, 2024 04:08
if (!accepted) {
String message = "Value [{}] of parameter [{}] was not accepted and will be dropped!";
if (devMode) {
LOG.warn(message, normalizeSpace(value), normalizeSpace(name));

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYzNdMMm8ZfvrnGxTt_i-->Change this code to not log user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_struts&issues=AYzNdMMm8ZfvrnGxTt_i&open=AYzNdMMm8ZfvrnGxTt_i&pullRequest=829">SonarCloud</a></p>
HttpParameters parameters = retrieveParameters(ac);

if (LOG.isDebugEnabled()) {
LOG.debug("Setting params {}", normalizeSpace(getParameterLogMap(parameters)));

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYzNw0sJG01541rIzgj_-->Change this code to not log user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_struts&issues=AYzNw0sJG01541rIzgj_&open=AYzNw0sJG01541rIzgj_&pullRequest=829">SonarCloud</a></p>
if (devMode) {
LOG.warn(message, normalizeSpace(value), normalizeSpace(name));
} else {
LOG.debug(message, normalizeSpace(value), normalizeSpace(name));

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYzNw0sJG01541rIzgkA-->Change this code to not log user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_struts&issues=AYzNw0sJG01541rIzgkA&open=AYzNw0sJG01541rIzgkA&pullRequest=829">SonarCloud</a></p>
@kusalk kusalk marked this pull request as ready for review January 3, 2024 05:43
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.interceptor.parameter;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an action related interface and I prefer to put them in org.apache.struts2.action package - this should avoid users' confusion if such interface works with interceptors. wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@kusalk kusalk merged commit ed06d61 into master Jan 3, 2024
6 of 7 checks passed
@kusalk kusalk deleted the WW-5352-parameter-annotation branch January 3, 2024 12:04
Copy link

sonarcloud bot commented Jan 3, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

20 New issues
0 Security Hotspots
86.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

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.

2 participants