From e6c74c3e88f2aadcc40fd5de1d4d7c8914de530d Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 6 Sep 2022 16:48:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E4=B8=AD=E8=87=AA=E5=AE=9A=E4=B9=89=E8=AF=B7=E6=B1=82=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E7=94=A8=E5=8F=98=E9=87=8F=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E8=AE=A4=E8=AF=81=E9=85=8D=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016601 --user=王孝刚 【接口测试】github#17678,接口自动化中自定义请求域名用变量的情况下,认证配置不生效 https://www.tapd.cn/55049933/s/1239577 --- .../dto/definition/request/auth/MsAuthManager.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/auth/MsAuthManager.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/auth/MsAuthManager.java index e6a1871578..875573400a 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/auth/MsAuthManager.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/auth/MsAuthManager.java @@ -68,16 +68,7 @@ public class MsAuthManager extends MsTestElement { ParameterConfig config = (ParameterConfig) msParameter; AuthManager authManager = initBase(); Authorization auth = new Authorization(); - if (this.url != null) { - auth.setURL(this.url); - } else { - if (config != null && config.isEffective(this.getProjectId())) { - if (config.isEffective(this.getProjectId())) { - String url = config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol() + "://" + config.getConfig().get(this.getProjectId()).getHttpConfig().getSocket(); - auth.setURL(url); - } - } - } + auth.setURL(""); auth.setUser(this.username); auth.setPass(this.password); auth.setMechanism(mechanismMap.get(this.getVerification())); @@ -90,7 +81,7 @@ public class MsAuthManager extends MsTestElement { try { AuthManager authManager = initBase(); Authorization auth = new Authorization(); - auth.setURL(samplerProxy.getProtocol() + "://" + samplerProxy.getDomain()); + auth.setURL(""); auth.setUser(msAuthManager.getUsername()); auth.setPass(msAuthManager.getPassword()); auth.setMechanism(mechanismMap.get(msAuthManager.getVerification()));