Skip to content

Commit 618eaee

Browse files
committed
fix: correct variable name from rasKey to rsaKey across multiple files
1 parent 64d05a7 commit 618eaee

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

ui/src/api/type/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface ChatProfile {
1212
// 登录类型
1313
login_value?: Array<string>
1414
max_attempts?: number
15-
rasKey?: string
15+
rsaKey?: string
1616
}
1717

1818
interface ChatUserProfile {

ui/src/stores/modules/user.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface userStateTypes {
1717
edition: 'CE' | 'PE' | 'EE'
1818
workspace_id: string
1919
workspace_list: Array<any>,
20-
rasKey: string
20+
rsaKey: string
2121
}
2222

2323
const useUserStore = defineStore('user', {
@@ -28,7 +28,7 @@ const useUserStore = defineStore('user', {
2828
edition: 'CE',
2929
workspace_id: '',
3030
workspace_list: [],
31-
rasKey: '',
31+
rsaKey: '',
3232
}),
3333
actions: {
3434
getLanguage() {
@@ -142,7 +142,7 @@ const useUserStore = defineStore('user', {
142142
this.license_is_valid = ok.data.license_is_valid
143143
this.edition = ok.data.edition
144144
this.version = ok.data.version
145-
this.rasKey = ok.data.ras
145+
this.rsaKey = ok.data.rsa
146146
const theme = useThemeStore()
147147
if (this.isEE() || this.isPE()) {
148148
await theme.theme()

ui/src/views/chat/user-login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const loginHandle = () => {
251251
})
252252
})
253253
} else {
254-
const publicKey = forge.pki.publicKeyFromPem(chatUser?.chat_profile?.rasKey as any);
254+
const publicKey = forge.pki.publicKeyFromPem(chatUser?.chat_profile?.rsaKey as any);
255255
const jsonData = JSON.stringify(loginForm.value);
256256
const utf8Bytes = forge.util.encodeUtf8(jsonData);
257257
const encrypted = publicKey.encrypt(utf8Bytes, 'RSAES-PKCS1-V1_5');

ui/src/views/login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const loginHandle = () => {
200200
loading.value = false
201201
})
202202
} else {
203-
const publicKey = forge.pki.publicKeyFromPem(user.rasKey);
203+
const publicKey = forge.pki.publicKeyFromPem(user.rsaKey);
204204
// 转换为UTF-8编码后再加密
205205
const jsonData = JSON.stringify(loginForm.value);
206206
const utf8Bytes = forge.util.encodeUtf8(jsonData);

0 commit comments

Comments
 (0)