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

[bugfix] Fix parsing of large secrets #2654

Merged
merged 1 commit into from Sep 9, 2023

Conversation

dominikschulz
Copy link
Member

The AKV secret type does rely on the bufio.Scanner and that uses a 64k limit by default. This change extends the limit to always match the supplied input data. This might exceed the available memory but not corrupt the output data.

If we want to support payloads larger than the available memory we must make large changes to the parser. But since the issue is quite severe and we don't advertise to support huge playloads this seems to be a good compromise.

Fixes #2594

The AKV secret type does rely on the bufio.Scanner and that uses
a 64k limit by default. This change extends the limit to always
match the supplied input data. This might exceed the available
memory but not corrupt the output data.

If we want to support payloads larger than the available memory
we must make large changes to the parser. But since the issue
is quite severe and we don't advertise to support huge playloads
this seems to be a good compromise.

Fixes gopasspw#2594

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@dominikschulz dominikschulz merged commit fb7f53b into gopasspw:master Sep 9, 2023
8 checks passed
@dominikschulz dominikschulz deleted the fix/issue-2594 branch September 9, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inserted binary data differs from original
1 participant