Skip to content

[fix] service.bat JvmOptions9 - FollowUp on Improve CVE-2024-56337 protection #858

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

Open
wants to merge 3 commits into
base: 9.0.x
Choose a base branch
from

Conversation

mhoffrog
Copy link

@mhoffrog mhoffrog commented May 20, 2025

Reference: Commit 0c75cd1 by @markt-asf

Issue: The commit referred did miss to keep service.bat JvmOptions9 in line with the change of catalina.bat made by that commit.

Changes:

  • service.bat:

    • fix JvmOptions9 to followup according changes in catalina.bat
    • improve legibility of JvmOptions9 parameter line by introducing intermediate set variable JVM9_OPTIONS
    • add comment to JVM9_OPTIONS settings with hint to keep in line with catalina.bat
  • catalina.bat:

    • add comment to JDK_JAVA_OPTIONS --add-opens settings with hint to keep in line with service.bat

Test result: (updated after commit 3767fd5)
image

- service.bat:
  - fix JvmOptions9 to followup according changes in catalina.bat
  - improve legibility of JvmOptions9 parameter line
    by introducing intermediate set variable JVM9_OPTIONS
  - add comment to JVM9_OPTIONS settings
    with hint to keep in line with catalina.bat

- catalina.bat:
  - add comment to JDK_JAVA_OPTIONS --add-opens settings
    with hint to keep in line with service.bat
mhoffrog referenced this pull request May 20, 2025
Don't use reflection unless necessary. This means less impact for those
using Tomcat in an embedded environment.
@rainerjung
Copy link
Contributor

rainerjung commented May 20, 2025

Docs for Commons Daemon Procrun mention, that JvmOptions9 can use the same two separators, that JvmOptions can use. Namely ";" and "#". Currently we use ";" for JvmOptions and "#" for JvmOptions9. It might make sense to use ";" for both for consistency.

…parator

- service.bat:
  - replace '#' by ';' as option separator to make JvmOptions9
    consistent with the JvmOptions parameter coding
@mhoffrog
Copy link
Author

Docs for Commons Daemon Procrun mention, that JvmOptions9 can use the same two separators, that JvmOptions can use. Namely ";" and "#". Currently we use ";" for JvmOptions and "#" for JvmOptions9. It might make sense to use ";" for both for consistency.

@rainerjung Thanks for this hint - Done!

- catalina.bat,
  service.bat:
  - replace phrasing "- KEEP in line with ..."
    by "- ensure to keep it in line with ..."
@michael-o michael-o requested review from michael-o and removed request for michael-o May 21, 2025 10:32
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