Skip to content

disable bcc_self by default #825

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

Merged
merged 9 commits into from
Nov 12, 2019
Merged

disable bcc_self by default #825

merged 9 commits into from
Nov 12, 2019

Conversation

r10s
Copy link
Contributor

@r10s r10s commented Nov 11, 2019

this pr changes the default value for bcc_self to disabled for new installations. for existing existing installations, the value is not changed.

moreover, this pr adds a device-message when an autocrypt-setup-messages was decrypted successfully and bcc_self is disabled. the device-message informs the user about the bcc_self then. this is done in maybe_add_bcc_self_device_msg()

we may also call maybe_add_bcc_self_device_msg() when we see an incoming message that is not moved by us; this would also detect changes done on key transfers. but afaik, these parts are subject to change anyway, so maybe we can postpone that a bit.

closes #733

@hpk42
Copy link
Contributor

hpk42 commented Nov 12, 2019

the python tests have some dependencies on bcc-self=true. i guess the tests need to be adapted by either setting that mode, or changing the test assertions.

Copy link
Contributor

@hpk42 hpk42 left a comment

Choose a reason for hiding this comment

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

lgtm -- but what makes sure that the device message is not re-added on a second ac_setup?

@r10s
Copy link
Contributor Author

r10s commented Nov 12, 2019

lgtm -- but what makes sure that the device message is not re-added on a second ac_setup?

currently - nothing.
but i think this is no big issue for asm. they are normally not sent all the time.

but in general, as we definitely need this feature for other device-messages, i'd add an optional unique-string-id to dc_add_device_msg(). dc_add_device_msg() would use the message-id <unique-string-id>@device - and if a message with that message-id already exist, nothing would happen. re-using the message id has the advantage that no special db-rows are needed and functions for searching etc. already exists. also the message-id is displayed in the info-dialog, which can also be of some worth for debugging purposes.

EDIT: thinking it over, it is probably better to not use the same namespace as for message-ids. otherwise an attacker could at least prevent device-messages popping up.

@hpk42 hpk42 merged commit 5453768 into master Nov 12, 2019
@r10s r10s deleted the bcc-self branch November 12, 2019 15:14
@hpk42 hpk42 restored the bcc-self branch January 29, 2020 15:26
@link2xt link2xt deleted the bcc-self branch June 18, 2021 16:45
@r10s r10s mentioned this pull request Sep 24, 2022
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.

disable bcc_self on new installations
2 participants