Skip to content

Conversation

AthBe1337
Copy link

No description provided.

@KotoriK KotoriK requested a review from Copilot August 3, 2025 11:40
Copy link

@Copilot Copilot AI left a 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);
Copy link
Preview

Copilot AI Aug 3, 2025

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.

@Shiroiame-Kusu
Copy link
Collaborator

走非官方api让我很难办啊

@AthBe1337
Copy link
Author

走非官方api让我很难办啊

想保留这个功能的话,大概只能这样了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants