magic-api icon indicating copy to clipboard operation
magic-api copied to clipboard

登录页面访问magic/web/config.json,返回的敏感信息不安全

Open qq572099423 opened this issue 2 years ago • 1 comments

登录页面访问magic/web/config.json包含敏感信息

image

qq572099423 avatar May 12 '23 07:05 qq572099423

在MagicAPIProperties添加注解@JsonIgnore可解决:

package org.ssssssss.magicapi.core.config;

import com.fasterxml.jackson.annotation.JsonIgnore; public class MagicAPIProperties {

    // 20231103 解决在访问http://ip:port/magic/web/config.json时泄露secretKey的问题
@JsonIgnore
public String getSecretKey() {
	return secretKey;
}

}

nownew avatar Nov 26 '23 01:11 nownew