-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
'Remove erroring [tile]entities' treats crash report as a format string #3713
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
Comments
This is far from the only occurrence of this problem. That method should not be using |
It pops up every now and again, the format is fine. |
Have seen this pop up occasionally, most recently in the FTB Crash subreddit. Crash report from the thread. |
The format is (in theory) fine, yes. But if we keep it we need to add escaping at every possible entrypoint. This is just like passing raw data into an SQL query or whatever. In the linked crash the issue is that just an entire crash-report output is shoved through |
Easy solution is just make sure you always give logs a format string: |
You mean |
Oh ok. I use a log4j logger directly, I didn't know FMLLog had an additional wrapper over it that applies |
When the 'remove erroring [tile]entities' option is turned on, tileentity/entioty crash reports are logged using FMLLog.sever. However, this method interprets the message as a format string. If the crash report text happens to contain any format string sequences, the server will crash with an
UnknownFormatConversionException
- meaning that the original exception is lost.The text was updated successfully, but these errors were encountered: