From ca794b627cd7ce9634ce215d39bc757d49e5810f Mon Sep 17 00:00:00 2001 From: "ken.lj" Date: Tue, 27 Jul 2021 20:21:21 +0800 Subject: [PATCH] throw exception on path+version not found when decoding request (#8357) --- .../org/apache/dubbo/remoting/transport/CodecSupport.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java index d4beb502949..ba1eaeed277 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java @@ -162,10 +162,7 @@ public static void checkSerialization(String path, String version, Byte id) thro ServiceRepository repository = ApplicationModel.getServiceRepository(); ProviderModel providerModel = repository.lookupExportedServiceWithoutGroup(path + ":" + version); if (providerModel == null) { - if (logger.isWarnEnabled()) { - logger.warn("Serialization security check is enabled but cannot work as expected because " + - "there's no matched provider model for path " + path + ", version " + version); - } + throw new IOException("Service " + path + " with version " + version + " not found, invocation rejected."); } else { List urls = providerModel.getServiceConfig().getExportedUrls(); if (CollectionUtils.isNotEmpty(urls)) {