This commit is contained in:
Jesse Hills 2024-08-19 16:28:32 +12:00
parent 784bedab8c
commit 0f73ae4ae1
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -1469,7 +1469,7 @@ void APIConnection::execute_service(const ExecuteServiceRequest &msg) {
NoiseEncryptionSetKeyResponse APIConnection::noise_encryption_set_key(const NoiseEncryptionSetKeyRequest &msg) { NoiseEncryptionSetKeyResponse APIConnection::noise_encryption_set_key(const NoiseEncryptionSetKeyRequest &msg) {
psk_t psk{}; psk_t psk{};
NoiseEncryptionSetKeyResponse resp; NoiseEncryptionSetKeyResponse resp;
if (base64_decode(msg.key.data(), psk.data(), msg.key.size()) != psk.size()) { if (base64_decode(msg.key, psk.data(), msg.key.size()) != psk.size()) {
ESP_LOGW(TAG, "Invalid encryption key length"); ESP_LOGW(TAG, "Invalid encryption key length");
resp.success = false; resp.success = false;
return resp; return resp;