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

1.7.0: Logger.access() vs application.path="." #1404

Open
JohannesBeranek opened this issue Apr 20, 2022 · 1 comment
Open

1.7.0: Logger.access() vs application.path="." #1404

JohannesBeranek opened this issue Apr 20, 2022 · 1 comment

Comments

@JohannesBeranek
Copy link

Play version 1.7.0, tested in DEV mode

Expected Behavior

Set application.path="." or do not set application.path (defaults to "."), application.log.path="/log4j.properties", log4j.properties exists in conf/ dir
-> logger config works

Actual Behavior

Logger.access() returns false, as absolute log4j.properties path does not start with "."

access() should be removed (I don't really see any benefit of access checking here, as someone who can modify the conf file has already breached the system anyway)
alternatively:
check against Play.applicationPath.getAbsolutePath().normalize()

Unfortunately it's not possible to work around this issue due to visibility of methods in Logger method -
one could use onConfigurationRead in a plugin to manually init Logger, effictively copy&pasting LOTS of code from Logger class OR set application.path to an absolute path, but both is a step back from previous behavior.

@JohannesBeranek
Copy link
Author

Issue is still open

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

No branches or pull requests

1 participant