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

Log intended folders instead of empty strings #1069

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Conversation

eloquence
Copy link
Member

@eloquence eloquence commented Apr 24, 2020

Description

Fixes #1060. The changes in #965 switched to the wrong variable to get the folder name, so that we ended up logging empty strings instead of the intended (journalist designation) folders.

Test Plan

  1. Start the client from this branch (dev env should be fine) and sync with a server environment
    • Observe that the logs do not include sensitive original filenames (e.g., an uploaded file moscow.avi should not appear in the logs under that name after the file is downloaded in the client)

Checklist

  • These changes should not need testing in Qubes
  • No update to the AppArmor profile is required for these changes

@@ -375,5 +375,5 @@ def call_decrypt(self, filepath: str, session: Session = None) -> str:
filepath, plaintext_filepath, is_doc=True
)
logger.info("Decrypted file '{}' to folder '{}'".format(
filepath, os.path.dirname(original_filename)))
os.path.basename(filepath), os.path.dirname(filepath)))
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this use of os.path.basename fixes another bug; the folder would otherwise be logged twice.

@redshiftzero redshiftzero merged commit 5977b73 into master Apr 24, 2020
@redshiftzero redshiftzero deleted the 1060-fix-logs branch April 24, 2020 13:59
@redshiftzero redshiftzero mentioned this pull request May 7, 2020
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs contain empty strings where path names expected
2 participants