Harden decryption error handling by jguz-pubnub · Pull Request #235 · pubnub/python · GitHub
Skip to content

Harden decryption error handling#235

Draft
jguz-pubnub wants to merge 1 commit into
masterfrom
python-sec-fixes
Draft

Harden decryption error handling#235
jguz-pubnub wants to merge 1 commit into
masterfrom
python-sec-fixes

Conversation

@jguz-pubnub

@jguz-pubnub jguz-pubnub commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

fix: raises PubNubException('decryption error') on failure instead of returning the still-encrypted bytes

PubNubFileCrypto.decrypt now raises PubNubException('decryption error') instead of returning the still-encrypted bytes on failure, so callers can no longer mistake ciphertext for plaintext.

fix: return one generic decryption error from cryptors instead of the crypto-library message

Cryptors now return a single generic error on any decryption failure instead of surfacing the underlying crypto-library message. Cause kept in debug logs only.

@pubnub-ops-terraform

pubnub-ops-terraform commented Jun 26, 2026

Copy link
Copy Markdown

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