-
-
Notifications
You must be signed in to change notification settings - Fork 400
修复评论区QQ头像显示 #1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: preview
Are you sure you want to change the base?
修复评论区QQ头像显示 #1315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes QQ avatar display in the comment section by switching from a deprecated QQ API to a new one that requires an API key. The implementation also improves the encryption security for QQ numbers and adds proper key management.
- Replaces deprecated QQ API with a new API that requires authentication
- Updates encryption method to use proper random IV instead of repeated key
- Adds configuration option for the new API key
- Implements secure key generation and storage mechanism
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
opt/options/theme-options.php | Adds configuration field for QQ Avatar API Key |
inc/classes/QQ.php | Updates API endpoint and improves encryption decryption logic |
functions.php | Fixes encryption implementation and adds secure key management |
$iv_length = openssl_cipher_iv_length('aes-128-cbc'); | ||
$iv = openssl_random_pseudo_bytes($iv_length); | ||
|
||
$iv = substr(md5($sakura_privkey), 0, 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a deterministic IV derived from the key weakens encryption security. The IV should be randomly generated for each encryption operation to ensure semantic security.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
走非官方api让我很难办啊 |
想保留这个功能的话,大概只能这样了 |
No description provided.