You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2023/08/10 09:37:14 UTC

[dubbo] branch dependabot/maven/com.alibaba.fastjson2-fastjson2-2.0.38 updated: throws exception if ban

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch dependabot/maven/com.alibaba.fastjson2-fastjson2-2.0.38
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/dependabot/maven/com.alibaba.fastjson2-fastjson2-2.0.38 by this push:
     new 8f33178c0f throws exception if ban
8f33178c0f is described below

commit 8f33178c0f53ddce3a29e594ee317591a0419043
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Aug 10 17:36:32 2023 +0800

    throws exception if ban
---
 .../common/serialize/fastjson2/Fastjson2SecurityManager.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java b/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java
index 32e477b2e3..158966309e 100644
--- a/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java
+++ b/dubbo-serialization/dubbo-serialization-fastjson2/src/main/java/org/apache/dubbo/common/serialize/fastjson2/Fastjson2SecurityManager.java
@@ -16,10 +16,6 @@
  */
 package org.apache.dubbo.common.serialize.fastjson2;
 
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
 import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
 import org.apache.dubbo.common.logger.LoggerFactory;
 import org.apache.dubbo.common.utils.AllowClassNotifyListener;
@@ -31,6 +27,10 @@ import org.apache.dubbo.rpc.model.FrameworkModel;
 import com.alibaba.fastjson2.filter.ContextAutoTypeBeforeHandler;
 import com.alibaba.fastjson2.util.TypeUtils;
 
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
 import static com.alibaba.fastjson2.util.TypeUtils.loadClass;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_UNTRUSTED_SERIALIZE_CLASS;
 import static org.apache.dubbo.common.utils.SerializeCheckStatus.STRICT;
@@ -115,7 +115,7 @@ public class Fastjson2SecurityManager implements AllowClassNotifyListener {
                     logger.error(PROTOCOL_UNTRUSTED_SERIALIZE_CLASS, "", "", msg);
                 }
 
-                return null;
+                throw new IllegalArgumentException(msg);
             }
 
             // 3. try load