threema-web icon indicating copy to clipboard operation
threema-web copied to clipboard

Contacts ID is revealed in the URL

Open frommMoritz opened this issue 5 years ago • 6 comments

Expected Behavior

I expect a contacts ID not to be part of the URL.

Current Behavior

In my opinion there is no need to have your contact's ID in the URL (https://web.threema.ch/#!/messenger/conversation/contact/ABCDE1234) since the URL is rewritten to https://web.threema.ch/#!/welcome when you open a new threema web tab. The inclusion of messenger/conversation/contact/ABCDE1234 is therefore not needed. This compromises users privacy because it is an unnecessary indicator of whom you contacted is persisted in your browsing history.

Possible Solution

The Contacts ID should be stored within the javascript and therefore would not appear in the URL bar and not be pushed to history.

Your Environment

  • Threema Web version: 2.1.7
  • Browser name and version: Firefox 66.0.2

frommMoritz avatar Apr 12 '19 20:04 frommMoritz

Agree that it can be a leak depending on how one uses the browser.

However, an ID (not necessarily the Threema ID) is definitely required to keep track of the view state. Using the Threema ID for that does make sense in order to provide context.

One idea to fix this is to hash the Threema ID with a salt that is being predetermined by the app (or randomly generated for the session by the web client). This would keep the 1:1 mapping but not disclose any privacy relevant data.

lgrahl avatar Apr 13 '19 15:04 lgrahl

Maybe I'm wrong here, but is not writing the full URL in the browser's address bar optional in a SPA?

ovalseven8 avatar Apr 15 '19 18:04 ovalseven8

Maybe I'm wrong here, but is not writing the full URL in the browser's address bar optional in a SPA?

Yes, that should be possible with pushState.

dbrgn avatar Apr 16 '19 13:04 dbrgn

Turns out having no URL path at all can be enabled very easily, but it seems that browser navigation is broken by that: https://stackoverflow.com/questions/56933513/angular-ui-router-states-without-url-but-with-working-back-navigation

dbrgn avatar Jul 08 '19 11:07 dbrgn

but it seems that browser navigation is broken by that

Is that any problem for this SPA? The browser navigation (go back/forward) does not work really work WITHIN the SPA anyway.

ovalseven8 avatar Nov 07 '19 17:11 ovalseven8

There's no inherent reason why browser navigation should not work in an SPA.

dbrgn avatar Nov 11 '19 08:11 dbrgn