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

ansible-vault: handle utf-8 filename in vault #50341

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
6 participants
@Akasurde
Copy link
Member

Akasurde commented Dec 27, 2018

SUMMARY

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

changelogs/fragments/50316-ansible-vault_utf-8_in_vault_filename.yaml
lib/ansible/parsing/vault/__init__.py
test/integration/targets/vault/runme.sh
test/integration/targets/vault/test_utf8_value_in_filename.yml
test/integration/targets/vault/vault-café.yml

@resmo

resmo approved these changes Dec 27, 2018

Copy link
Member

resmo left a comment

failing test seems unrelated.

shipit

@@ -736,7 +736,7 @@ def decrypt_and_get_vault_id(self, vaulttext, filename=None):
vault_secret_used = vault_secret
file_slug = ''
if filename:
file_slug = ' of "%s"' % filename
file_slug = ' of "%s"' % to_text(filename)

This comment has been minimized.

@mkrizek

mkrizek Jan 2, 2019

Contributor

Unsure but shouldn't you use u"" prefix to prevent merging bytes and unicode (on Python2). @webknjaz ?

@sivel sivel removed needs_triage labels Jan 3, 2019

@ansibot ansibot added shipit and removed needs_revision labels Jan 3, 2019

@gundalow
Copy link
Contributor

gundalow left a comment

marking this as needs update for u"" to remove ship it

@Akasurde Akasurde force-pushed the Akasurde:i50316 branch 2 times, most recently from e96c8b7 to 9986c79 Jan 11, 2019

@Akasurde

This comment has been minimized.

Copy link
Member

Akasurde commented Jan 11, 2019

@gundalow @mkrizek Could you please review again ?

@ansibot ansibot removed the stale_ci label Jan 11, 2019

@ansibot ansibot added core_review and removed needs_revision labels Jan 11, 2019

@@ -736,7 +736,7 @@ def decrypt_and_get_vault_id(self, vaulttext, filename=None):
vault_secret_used = vault_secret
file_slug = ''
if filename:
file_slug = ' of "%s"' % filename
file_slug = u' of "%s"' % to_text(filename)

This comment has been minimized.

@mkrizek

mkrizek Jan 14, 2019

Contributor

I think you need to ensure that you are not merging bytes and unicode in display.vvvv below as well; use u"" and make sure that all args are unicode. Also, line 737 needs file_slug = u''?

ansible-vault: handle utf-8 filename in vault
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

@Akasurde Akasurde force-pushed the Akasurde:i50316 branch from 9986c79 to fc63a2e Jan 14, 2019

@ansibot ansibot added needs_revision and removed core_review labels Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment