Projects
home:zhangxiang:branches:Mega:23.03
log4j12
_service:tar_scm:CVE-2022-23302.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:CVE-2022-23302.patch of Package log4j12
From: Markus Koschany <apo@debian.org> Date: Mon, 31 Jan 2022 11:30:35 +0100 Subject: CVE-2022-23302 Origin: https://github.com/qos-ch/reload4j/commit/f221f2427c45134cf5768f46279ddf72fe1407c9 --- src/main/java/org/apache/log4j/net/JMSSink.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/apache/log4j/net/JMSSink.java b/src/main/java/org/apache/log4j/net/JMSSink.java index 6a02831..c25b4a3 100644 --- a/src/main/java/org/apache/log4j/net/JMSSink.java +++ b/src/main/java/org/apache/log4j/net/JMSSink.java @@ -88,8 +88,7 @@ public class JMSSink implements javax.jms.MessageListener { try { Context ctx = new InitialContext(); TopicConnectionFactory topicConnectionFactory; - topicConnectionFactory = (TopicConnectionFactory) lookup(ctx, - tcfBindingName); + topicConnectionFactory = (TopicConnectionFactory) JNDIUtil.lookupObject(ctx, tcfBindingName); TopicConnection topicConnection = topicConnectionFactory.createTopicConnection(username, @@ -99,7 +98,7 @@ public class JMSSink implements javax.jms.MessageListener { TopicSession topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - Topic topic = (Topic)ctx.lookup(topicBindingName); + Topic topic = (Topic) JNDIUtil.lookupObject(ctx, topicBindingName); TopicSubscriber topicSubscriber = topicSession.createSubscriber(topic); @@ -135,15 +134,6 @@ public class JMSSink implements javax.jms.MessageListener { } - protected static Object lookup(Context ctx, String name) throws NamingException { - try { - return ctx.lookup(name); - } catch(NameNotFoundException e) { - logger.error("Could not find name ["+name+"]."); - throw e; - } - } - static void usage(String msg) { System.err.println(msg); System.err.println("Usage: java " + JMSSink.class.getName()
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2