Skip to content

typo - loadPulicKey#11

Open
Linegod wants to merge 1 commit intoCacti:developfrom
Linegod:fix-typo
Open

typo - loadPulicKey#11
Linegod wants to merge 1 commit intoCacti:developfrom
Linegod:fix-typo

Conversation

@Linegod
Copy link
Copy Markdown
Member

@Linegod Linegod commented Apr 24, 2026

$rsa->loadPulicKey($rrdp_config['encryption']['public_key']);

should be

$rsa->loadPublicKey($rrdp_config['encryption']['public_key']);

Copilot AI review requested due to automatic review settings April 24, 2026 05:54
Copy link
Copy Markdown
Contributor

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 aims to fix a typo in the RSA public key loading call inside the set rsa keys command handler so RSA key generation/configuration can proceed without a method-name error.

Changes:

  • Fixes a typo: loadPulicKeyloadPublicKey when loading the configured RSA public key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rrdtool-proxy.php
Comment on lines +2005 to 2006
$rsa->loadPublicKey($rrdp_config['encryption']['public_key']);
$rrdp_config['encryption']['public_key_fingerprint'] = $rsa->getFingerprint();
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSA::loadPublicKey() in phpseclib returns a key object; calling it as $rsa->loadPublicKey(...) and then ignoring the return value means $rsa->getFingerprint() is likely operating on the wrong object (and may not exist), so the fingerprint calculation can still fail. Align this with rrdp_system__encryption_init() by assigning the return value of RSA::loadPublicKey(...) (or using the $public key object directly) and calling getFingerprint() on that key object.

Suggested change
$rsa->loadPublicKey($rrdp_config['encryption']['public_key']);
$rrdp_config['encryption']['public_key_fingerprint'] = $rsa->getFingerprint();
$public_key = $rsa->loadPublicKey($rrdp_config['encryption']['public_key']);
$rrdp_config['encryption']['public_key_fingerprint'] = $public_key->getFingerprint();

Copilot uses AI. Check for mistakes.
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