Skip to content

Initial 2.5.2.0 release preparation #784

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

Merged
merged 25 commits into from
Apr 12, 2023
Merged

Initial 2.5.2.0 release preparation #784

merged 25 commits into from
Apr 12, 2023

Conversation

kwwall
Copy link
Contributor

@kwwall kwwall commented Apr 10, 2023

Mostly to address CVE-2023-24998 in Apache Commons Files Upload, but other minor changes described in the 2.5.2.0 release notes (which are included).

kwwall added 19 commits March 26, 2023 14:23
Updated date.prev_release to compute CHANGELOG for 'mvn site'.
…adFileCount and HttpUtilities.FileUploadAllowAnonymousUser.
@kwwall
Copy link
Contributor Author

kwwall commented Apr 10, 2023

@jeremiahjstacey and @xeno6696 - One of you at least needs to review and approve this PR. (I can do the merge, as I want to add a few comments during the merge.)

Jeremiah, please at least look at HTTPUtilitiesTest.java and the changes there. You will see that I have a few questions and you seem to have a lot of expertise about JUnit. There is a chuck of new code in DefaultHTTPUtilities.java references FIXME and mentions your GitHub ID. It wasn't able to see the log output when I locally changed the log level from INFO to DEBUG. Maybe you can tell me what I was doing wrong. I changed it both places in file esapi-java-logging.properties which I thought was the only place I needed to tweak it.

try {
response2 = ESAPI.httpUtilities().getFileUploads(request2, home);
} catch( ValidationUploadException vuex ) {
caughtExpectedException = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are built-in ways to assert that a test fails as expected using content like the ExpectedException rule (junit4) or using @Test (expected=ValidationUploadException.class)

Just fyi points that achieve the same general goal.

There are possible optimizations for this test, but I believe that overall it achieves the desired effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I will fix that. I probably need to import the appropriate annotation though as well too. And I will also add @ignore annotation instead of commenting everything out from that one test like I did which is just ugly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The @ignore annotation didn't work, probably because we are still using the JUnit 3 stype TestSuite test setup, so I just left the testGetFileUploadsUnauthenticatedUser commented out.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My apologies for not returning to this one in time, I can add refactoring this test to the percent codec update for UTF-8 on my TODO. This one will probably be done sooner.

Copy link
Collaborator

@jeremiahjstacey jeremiahjstacey left a comment

Choose a reason for hiding this comment

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

This all looks good to me @kwwall.
Barring any contrary feedback from @xeno6696, I see no reason this cannot be merged in.

Will intend on doing that Wednesday evening to provide time for any additional feedback or concerns

@kwwall
Copy link
Contributor Author

kwwall commented Apr 12, 2023

@jeremiahjstacey - In case @xeno6696 doesn't get around to approving this, let me do the merge as I may wish to add some additional comments here. (Or not; haven't really decided, but probably will want to edit them a bit and prefer not to have to do 'git comment --amend'.) So I will wait until COB tomorrow for @xeno6696 approval, but if he doesn't have time, I will proceed with the merge without him.

P.S.- Thanks for the review and the tips! (I was going to write 'pointers', but this is Java, so no pointers.)

"--ridiculous\r\n" +
"Content-Disposition: form-data; name=\"full-name\"\r\n\r\n" +
"kevin w wall\r\n" +
"--ridiculous\r\n" +
Copy link
Collaborator

Choose a reason for hiding this comment

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

I hear a song in my head with all these calls of "rediculous..." ;-)

response2.forEach(file -> file.delete());
}
// If this assertion fails, check the property HttpUtilities.MaxUploadFileCount in
// 'src/test/resources/esapi/ESAPI.properties' to make sure it is still to 2.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for being explicit enough for newbies here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Newbies? Heck, I wrote that comment for myself so I wouldn't have to go out and debug the code in a year or so. :)

@kwwall kwwall merged commit fea010a into ESAPI:develop Apr 12, 2023
@kwwall kwwall deleted the 2.5.2.0-release branch April 12, 2023 22:34
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.

3 participants