Skip to content
This repository was archived by the owner on Jul 21, 2024. It is now read-only.

Commit e5f43a8

Browse files
committed
* 禁止保存认证用户名密码
1 parent 2aadf24 commit e5f43a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/github/zxbu/webdavteambition/config/AliYunDriveProperties.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class AliYunDriveProperties implements InitializingBean {
3232
public String appId = "5dde4e1bdf9e4966b387ba58f4b3fdc3";
3333
public Session session = new Session();
3434

35-
public Auth auth = new Auth();
35+
public transient Auth auth = new Auth();
3636

3737
public void save() {
3838
String json = JsonUtil.toJsonPretty(this);
@@ -64,8 +64,10 @@ public static AliYunDriveProperties load(String workDir) {
6464
@Override
6565
public void afterPropertiesSet() throws Exception {
6666
String refreshToken = this.refreshToken;
67+
Auth auth = this.auth;
6768
AliYunDriveProperties other = load(workDir);
6869
BeanUtils.copyProperties(other, this);
70+
this.auth = auth;
6971
this.authorization = null;
7072
if (StringUtils.isEmpty(this.deviceId)) {
7173
this.deviceId = UUID.randomUUID().toString().replace("-", "").substring(0, 24);

0 commit comments

Comments
 (0)