-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '44998f21160d9286edeafff3948728d5d5795669' into release
- Loading branch information
Showing
13 changed files
with
255 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
✨ Features | ||
|
||
- 现在当设置了内置服务器鉴权密钥时,图床设置界面复制api接口会自动添加密钥 | ||
- 添加了`PicList`自身作为套娃图床,实现A电脑添加B电脑的`PicList`进行上传的功能 | ||
- 新增上传耗时等统计功能 | ||
- 现在上传接口不再明文返回`config`字段,而是经过加密的字符串,密钥可自行设置 | ||
|
||
🐛 Bug Fixes | ||
|
||
- 修复了电脑间同步管理配置文件时,无法正常进入图床,需要重新保存一次配置的问题 | ||
- 修复了arm mac平台缺失右键菜单的问题 | ||
- 修复了跳过水印字体下载没有对文件上传情景生效的问题 | ||
- 修复了文件名中含有二级目录时,webdav、local和sftp图床会上传失败的问题 | ||
- 修复了使用watt toolkit加速时,github图床上传失败的问题 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
✨ Features | ||
|
||
- Now when the built-in server authentication key is set, the copy API interface in the image bed setting interface will automatically add the key | ||
- Added `PicList` itself as a nested image bed, which realizes the function of A computer adding B computer's `PicList` for uploading | ||
- Added upload time consumption and other statistics functions | ||
- Now the upload interface no longer returns the `config` field in plain text, but an encrypted string, and the key can be set by yourself | ||
|
||
🐛 Bug Fixes | ||
|
||
- Fixed the problem that when synchronizing and managing configuration files between computers, the image bed cannot be entered normally, and the configuration needs to be saved again | ||
- Fixed the problem that the right-click menu is missing on the arm mac platform | ||
- Fixed the problem that skipping the watermark font download does not take effect on file upload scenarios | ||
- Fix the problem that the webdav, local and sftp image beds will fail to upload when the file name contains a secondary directory | ||
- Fix the problem that the github image bed will fail to upload when using the watt toolkit acceleration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "piclist", | ||
"version": "2.6.4", | ||
"version": "2.6.5", | ||
"author": { | ||
"name": "Kuingsmile", | ||
"email": "[email protected]" | ||
|
@@ -48,36 +48,36 @@ | |
"ali-oss": "^6.18.1", | ||
"axios": "^1.5.1", | ||
"compare-versions": "^4.1.3", | ||
"core-js": "^3.32.2", | ||
"core-js": "^3.33.0", | ||
"cos-nodejs-sdk-v5": "^2.12.4", | ||
"dexie": "^3.2.4", | ||
"electron-updater": "^6.1.4", | ||
"element-plus": "2.4.0", | ||
"element-plus": "2.4.1", | ||
"epipebomb": "^1.0.0", | ||
"fast-xml-parser": "^4.3.2", | ||
"form-data": "^4.0.0", | ||
"fs-extra": "^11.1.1", | ||
"got": "^12.6.0", | ||
"highlight.js": "^11.8.0", | ||
"highlight.js": "^11.9.0", | ||
"hpagent": "^1.2.0", | ||
"keycode": "^2.2.0", | ||
"lowdb": "^1.0.0", | ||
"marked": "^8.0.0", | ||
"marked": "^9.1.2", | ||
"mime-types": "^2.1.35", | ||
"mitt": "^3.0.1", | ||
"multer": "^1.4.5-lts.1", | ||
"node-ssh-no-cpu-features": "^1.0.1", | ||
"nodejs-file-downloader": "^4.12.1", | ||
"piclist": "^1.6.0", | ||
"piclist": "^1.6.2", | ||
"pinia": "^2.1.7", | ||
"pinia-plugin-persistedstate": "^3.2.0", | ||
"qiniu": "^7.9.0", | ||
"qiniu": "^7.10.0", | ||
"qrcode.vue": "^3.4.1", | ||
"querystring": "^0.2.1", | ||
"shell-path": "2.1.0", | ||
"ssh2-no-cpu-features": "^1.0.0", | ||
"upyun": "^3.4.6", | ||
"uuid": "^9.0.0", | ||
"uuid": "^9.0.1", | ||
"video.js": "^8.5.2", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.2.5", | ||
|
@@ -89,23 +89,23 @@ | |
"devDependencies": { | ||
"@babel/plugin-proposal-optional-chaining": "^7.21.0", | ||
"@electron/notarize": "^2.1.0", | ||
"@types/ali-oss": "^6.16.9", | ||
"@types/electron-devtools-installer": "^2.2.3", | ||
"@types/ali-oss": "^6.16.10", | ||
"@types/electron-devtools-installer": "^2.2.4", | ||
"@types/fs-extra": "^11.0.2", | ||
"@types/inquirer": "^6.5.0", | ||
"@types/js-yaml": "^4.0.6", | ||
"@types/lowdb": "^1.0.12", | ||
"@types/mime-types": "^2.1.2", | ||
"@types/multer": "^1.4.8", | ||
"@types/js-yaml": "^4.0.8", | ||
"@types/lowdb": "^1.0.13", | ||
"@types/mime-types": "^2.1.3", | ||
"@types/multer": "^1.4.9", | ||
"@types/node": "^16.10.2", | ||
"@types/request-promise-native": "^1.0.19", | ||
"@types/semver": "^7.5.3", | ||
"@types/tunnel": "^0.0.4", | ||
"@types/upyun": "^3.4.1", | ||
"@types/uuid": "^9.0.3", | ||
"@types/uuid": "^9.0.5", | ||
"@types/write-file-atomic": "^4.0.1", | ||
"@typescript-eslint/eslint-plugin": "^6.7.5", | ||
"@typescript-eslint/parser": "^6.7.5", | ||
"@typescript-eslint/eslint-plugin": "^6.8.0", | ||
"@typescript-eslint/parser": "^6.8.0", | ||
"@vue/cli-plugin-babel": "^5.0.8", | ||
"@vue/cli-plugin-eslint": "^5.0.8", | ||
"@vue/cli-plugin-router": "^5.0.8", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import crypto from 'crypto' | ||
import picgo from '@core/picgo' | ||
|
||
function getDerivedKey (): Buffer { | ||
const userPassword = picgo.getConfig<string>('settings.aesPassword') || 'PicList-aesPassword' | ||
const fixedSalt = Buffer.from('a8b3c4d2e4f5098712345678feedc0de', 'hex') | ||
const fixedIterations = 100000 | ||
const keyLength = 32 | ||
return crypto.pbkdf2Sync(userPassword, fixedSalt, fixedIterations, keyLength, 'sha512') | ||
} | ||
|
||
export class AESHelper { | ||
key: Buffer | ||
constructor () { | ||
this.key = getDerivedKey() | ||
} | ||
|
||
encrypt (plainText: string) { | ||
const iv = crypto.randomBytes(16) | ||
const cipher = crypto.createCipheriv('aes-256-cbc', this.key, iv) | ||
let encrypted = cipher.update(plainText, 'utf8', 'hex') | ||
encrypted += cipher.final('hex') | ||
const encryptedData = `${iv.toString('hex')}:${encrypted}` | ||
return encryptedData | ||
} | ||
|
||
decrypt (encryptedData: string) { | ||
const parts = encryptedData.split(':') | ||
if (parts.length !== 2) { | ||
return '{}' | ||
} | ||
const iv = Buffer.from(parts[0], 'hex') | ||
const encryptedText = parts[1] | ||
const decipher = crypto.createDecipheriv('aes-256-cbc', this.key, iv) | ||
let decrypted = decipher.update(encryptedText, 'hex', 'utf8') | ||
decrypted += decipher.final('utf8') | ||
return decrypted | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.