@wu529778790/open-im 1.11.4 → 1.11.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clawbot/client.js +3 -3
- package/package.json +1 -1
package/dist/clawbot/client.js
CHANGED
|
@@ -284,13 +284,13 @@ async function extractImages(msg) {
|
|
|
284
284
|
const aesKeyHex = imageItem?.aeskey;
|
|
285
285
|
if (aesKeyHex && aesKeyHex.length === 32) {
|
|
286
286
|
try {
|
|
287
|
+
// AES-128-ECB 模式(官方 SDK 实现,无需 IV)
|
|
287
288
|
const keyBuf = Buffer.from(aesKeyHex, 'hex');
|
|
288
|
-
const
|
|
289
|
-
const decipher = createDecipheriv('aes-128-cbc', keyBuf, iv);
|
|
289
|
+
const decipher = createDecipheriv('aes-128-ecb', keyBuf, null);
|
|
290
290
|
finalBuffer = Buffer.concat([decipher.update(buffer), decipher.final()]);
|
|
291
291
|
}
|
|
292
292
|
catch {
|
|
293
|
-
log.info('AES decryption failed, using raw image data');
|
|
293
|
+
log.info('AES-128-ECB decryption failed, using raw image data');
|
|
294
294
|
finalBuffer = buffer;
|
|
295
295
|
}
|
|
296
296
|
}
|
package/package.json
CHANGED