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

EXPOSED-203 Lightweight DAO insert with encryptedVarchar attemtps to … #2194

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

obabichevjb
Copy link
Collaborator

Description

It's the issue similar to EXPOSED-474 Unexpected value of type when using a ColumnTransformer in a DAO object

The problem is that due to internal implementation of ResultRow, it tries to call valueFromDb multiple times. As a result, after the first call value is decrypted, and on the second call (with already decrypted value) it fails.

This behavior was already fixed for transformed columns, so it looks reasonable to reuse the new concept here too. So I updated EncryptedBinaryColumnType and EncryptedVarCharColumnType to use ColumnWithTransform under the hood. It also makes code simpler because there is no overriding of IColumnType interface methods.

Detailed description:

  • What: Detail what changes have been made in the PR.
  • Why: Explain the reasons behind the changes. Why were they necessary?
  • How: Describe how the changes were implemented, including any key aspects of the code modified or new features added.

Type of Change

Please mark the relevant options with an "X":

  • Bug fix

Affected databases:

  • MariaDB
  • Mysql5
  • Mysql8
  • Oracle
  • Postgres
  • SqlServer
  • H2
  • SQLite

Related Issues

EXPOSED-203 Lightweight DAO insert with encryptedVarchar attemtps to decrypt unencrypted input

@obabichevjb obabichevjb force-pushed the obabichev/exposed-203-decrypt-unencrypted-values branch from f2a94a4 to 2834603 Compare August 9, 2024 12:15
Copy link
Member

@bog-walk bog-walk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing so quickly! Please just remove the logger left in the test.

@obabichevjb obabichevjb merged commit e63f35b into main Aug 12, 2024
5 checks passed
@obabichevjb obabichevjb deleted the obabichev/exposed-203-decrypt-unencrypted-values branch August 12, 2024 19:05
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