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

Investigate permissions on chat.db and .vcf #9

Closed
Teddarific opened this issue Oct 29, 2020 · 4 comments · Fixed by #10
Closed

Investigate permissions on chat.db and .vcf #9

Teddarific opened this issue Oct 29, 2020 · 4 comments · Fixed by #10
Assignees
Labels
question Further information is requested

Comments

@Teddarific
Copy link
Collaborator

It's going to important to know what the technical limitations are in terms of accessing a chat.db and .vcf

This will help address what the user flow will look like:

  1. Can we directly query their chat.db file? (aka nothing is needed from the user beyond asking for permissions?)
  2. If not, what are the minimal number of steps the user needs to take in order for us to get an accessible chat.db?
@alexdanilowicz
Copy link
Collaborator

alexdanilowicz commented Nov 4, 2020

Can we directly query their chat.db file? (aka nothing is needed from the user beyond asking for permissions?)

Yes, we can simply do something like:

mkdir ~/.leftonread # hidden dir on root like most other apps
cp ~/Library/Messages/chat.db ~/.leftonread

The user is going to be prompted saying, "LEFT ON READ WOULD LIKE TO ACCESS YOUR COMPUTER"

For contacts, there's a few cases.

I think we are going to have to do this:

cp ~/Library/Application\ Support/AddressBook ~/.leftonread/AddressBook

And then read the AddressBook/Sources folder and look at each *.abcddb to see which is populated. If Sources/ does not exist, then we read the top-level *.abcddb

The user is going to be prompted saying, "LEFT ON READ WOULD LIKE TO ACCESS YOUR CONTACTS"


Note, if the user has security software, they are going to additionally prompted with something like this (I saw this on 1/4 computers I tested). Popups like these are a tradeoff if we do not have the user manually copying the chat.db and manually create a .vcf file

Screen Shot 2020-11-03 at 9 57 18 PM

@alexdanilowicz
Copy link
Collaborator

WIP PR which demonstrates this for the chat.db case is here: #10

The issue is that I'm not sure how this will look in a real packaged build until we follow these steps and sign + notarize the app
Screen Shot 2020-11-04 at 1 07 17 AM

@Teddarific
Copy link
Collaborator Author

Got it, thanks for the information. I can look into the signing & notarizing. @alexdanilowicz is this something that would be better to get sooner than later? Or are we confident that what we can reproduce in dev will be what we get when we package in prod?

@alexdanilowicz
Copy link
Collaborator

alexdanilowicz commented Nov 15, 2020

@Teddarific thanks for your response. We are not confident because I'm not sure how permissions will be treated on a production application. On the current dev application it's just "electron" than is asking for permissions. In prod, it will be "Left On Read", and I'd rather not take any chances.

I'd vote to sign and notarize sooner rather than later. @Teddarific. It also be great motivation. Not that we need any 😉

alexdanilowicz added a commit that referenced this issue Nov 24, 2020
Directly copy chat.db for user, update README, and add tests/

Resolves #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants