Skip to content
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

Bug: decrypt function fails if the ciphertext is just plaintext #23

Closed
calvinbrewer opened this issue Jan 3, 2025 · 0 comments
Closed
Assignees

Comments

@calvinbrewer
Copy link
Contributor

calvinbrewer commented Jan 3, 2025

Issue Description

When encryptedPayload.c is missing (i.e., not in the EQL payload data structure), the decrypt function currently panics. We want to handle this more gracefully by simply returning the original value and issuing a debug-level log message indicating that no ciphertext was found and the function will skip decryption. This ensures the function doesn’t break application flow due to absent ciphertext while still providing visibility through logging.

Proposed Change

  • Check if encryptedPayload.c is present.
  • If missing, return the original (unencrypted) value.
  • Log a debug message stating that the payload did not include a ciphertext, and decryption was skipped.
  • Maintain existing decryption steps if encryptedPayload.c is present.
@calvinbrewer calvinbrewer added the enhancement New feature or request label Jan 3, 2025
@calvinbrewer calvinbrewer self-assigned this Jan 3, 2025
@auxesis auxesis removed the enhancement New feature or request label Jan 7, 2025
@auxesis auxesis closed this as completed Jan 21, 2025
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

No branches or pull requests

2 participants