We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0960d19 commit 435491dCopy full SHA for 435491d
ui/src/views/login/index.vue
@@ -286,7 +286,9 @@ const login = () => {
286
.finally(() => (loading.value = false))
287
} else {
288
const publicKey = forge.pki.publicKeyFromPem(user.rasKey)
289
- const encrypted = publicKey.encrypt(JSON.stringify(loginForm.value), 'RSAES-PKCS1-V1_5')
+ const jsonData = JSON.stringify(loginForm.value)
290
+ const utf8Bytes = forge.util.encodeUtf8(jsonData)
291
+ const encrypted = publicKey.encrypt(utf8Bytes, 'RSAES-PKCS1-V1_5')
292
const encryptedBase64 = forge.util.encode64(encrypted)
293
user
294
.login({ encryptedData: encryptedBase64, username: loginForm.value.username })
0 commit comments