修复换服时报密码错bug
Some checks failed
Check Whitespace and New Line / check (push) Has been cancelled
Deploy Sphinx documentation to Pages / pages (push) Has been cancelled

This commit is contained in:
notify 2024-07-03 11:50:58 +08:00
parent 76c9b02623
commit 5946f6d1cf
2 changed files with 5 additions and 4 deletions

View File

@ -125,7 +125,7 @@
</message>
<message>
<source>help: unknown password error</source>
<translation>使127.0.0.1-></translation>
<translation></translation>
</message>
<message>
<source>help: you have been banned!</source>
@ -141,7 +141,7 @@
</message>
<message>
<source>help: username or password error</source>
<translation>127.0.0.1-></translation>
<translation></translation>
</message>
<message>
<source>help: md5 fail</source>
@ -348,7 +348,7 @@
</message>
<message>
<source>unknown password error</source>
<translation></translation>
<translation></translation>
</message>
<message>
<source>user name not in whitelist</source>

View File

@ -350,7 +350,8 @@ QString QmlBackend::pubEncrypt(const QString &key, const QString &data) {
// AES密钥和IV都是固定16字节的所以可以放在开头
auto key_bytes = key.toLatin1();
BIO *keyio = BIO_new_mem_buf(key_bytes.constData(), -1);
PEM_read_bio_RSAPublicKey(keyio, &rsa, NULL, NULL);
RSA_free(rsa);
rsa = PEM_read_bio_RSAPublicKey(keyio, NULL, NULL, NULL);
BIO_free_all(keyio);
auto data_bytes = data.toUtf8();