fix(module/config): read postgres byte streams before decryption#1772
Open
affinitytechworks wants to merge 2 commits intocypht-org:masterfrom
Open
fix(module/config): read postgres byte streams before decryption#1772affinitytechworks wants to merge 2 commits intocypht-org:masterfrom
affinitytechworks wants to merge 2 commits intocypht-org:masterfrom
Conversation
kroky
reviewed
Nov 3, 2025
| if (!$this->crypt) { | ||
| $data = $this->decode($data['settings']); | ||
| $settings = $data['settings']; | ||
| if (is_resource($settings)) { |
Member
There was a problem hiding this comment.
Can we do this at the place where stream is defined/used? It seems awkward to work with streams here. THis method should receive a string.
kroky
reviewed
Nov 3, 2025
| } | ||
| else { | ||
| $this->tls = false; | ||
| $this->tls = false; |
Member
There was a problem hiding this comment.
This seems to be part of another PR (which I already merged). Can you push one change at a time to a PR? Thanks.
Member
|
@affinitytechworks We need you :-) |
Member
|
Seems related to #1790 |
Member
|
@affinitytechworks we need you :-) |
Author
|
Hi Marc,Apologies, total zeitnot on my side - am I in critical path for your team? I’ll update/retest cypth by the end of the month. Kind regardsDMSent from my iPhoneOn Jan 14, 2026, at 04:43, Marc Laporte ***@***.***> wrote:marclaporte left a comment (cypht-org/cypht#1772)
@affinitytechworks we need you :-)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Member
|
No problem. Please just come back when you can :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostgreSQL can hand
hm_user_settings.settingsback as a stream resource when PDO is built with libpq support. Passing that resource straight intobase64_decode()causes a PHP 8 fatal error before libsodium gets a chance to decrypt the payload. Normalizing the value withstream_get_contents()ensures the stored settings are always a string before decode/decrypt, which allows users to log in again.