News for hackers. Stuff that matters.
Re:Log4j RCE Found by smsm42 on Saturday December 11, 2021 @05:40PM (#29524934)
TBH, this is a huge antipattern. You have to put some context in your logs, so it must be something like "debug.log("Got from peer: {}", stuffIGotFromPeer) or something like that. You can't complain printf(stuffIGotFromPeer) is dangerous, so here is the same. But in log4j, debug.log("Got from peer: {}", stuffIGotFromPeer) is as unsafe as the other one, too! There's no way to make it safe, as I understand.
Re:Log4j RCE Found by spion on Sunday December 12, 2021 @06:52AM (#29528843)
Don't see why not. Evaluate the `${}` stuff first, then do the `{}` substitutions.