-
Notifications
You must be signed in to change notification settings - Fork 84
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
dbscan()
in lib389 can return bytes
#5872
Labels
Milestone
Comments
vashirov
added a commit
that referenced
this issue
Aug 4, 2023
Bug Description: When attribute encryption or changelog encryption is used, `dbscan()` can return bytes instead of a string. Fix Description: * Update subprocess call to expect bytes instead of string. * Revert changes to the tests done in 8bf7829. * Update entryrdn_test to expect output from dbscan as bytes. Fixes: #5872 Relates: #5859 Reviewed-by: @progier, @droideck (Thanks!)
vashirov
added a commit
that referenced
this issue
Aug 4, 2023
Bug Description: When attribute encryption or changelog encryption is used, `dbscan()` can return bytes instead of a string. Fix Description: * Update subprocess call to expect bytes instead of string. * Revert changes to the tests done in 8bf7829. * Update entryrdn_test to expect output from dbscan as bytes. Fixes: #5872 Relates: #5859 Reviewed-by: @progier389, @droideck (Thanks!)
vashirov
added a commit
that referenced
this issue
Aug 4, 2023
Bug Description: When attribute encryption or changelog encryption is used, `dbscan()` can return bytes instead of a string. Fix Description: * Update subprocess call to expect bytes instead of string. * Revert changes to the tests done in 8bf7829. * Update entryrdn_test to expect output from dbscan as bytes. Fixes: #5872 Relates: #5859 Reviewed-by: @progier389, @droideck (Thanks!)
vashirov
added a commit
that referenced
this issue
Aug 4, 2023
Bug Description: When attribute encryption or changelog encryption is used, `dbscan()` can return bytes instead of a string. Fix Description: * Update subprocess call to expect bytes instead of string. * Revert changes to the tests done in 8bf7829. * Update entryrdn_test to expect output from dbscan as bytes. Fixes: #5872 Relates: #5859 Reviewed-by: @progier389, @droideck (Thanks!)
Seeing a regression in nightly CI tests: (missing a str() in is_dbi in import test ) ( I will create a new pr to fix it ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Issue Description
dbscan()
in lib389 extracts information from the database file. Most of the time the information returned bydbscan
executable is strings. But when attribute encryption or changelog encryption is enabled, the database can contain values that can't be parsed as a string in Python.By default subprocess output is considered bytes:
https://docs.python.org/3/library/subprocess.html#subprocess.CompletedProcess.stdout
But we explicitly use
text=True
to indicate that it is supposed to be a string:389-ds-base/src/lib389/lib389/__init__.py
Line 3072 in 96959cf
I think we should change
dbscan()
to always return bytes.The text was updated successfully, but these errors were encountered: