Commit Graph

2586 Commits

Author SHA1 Message Date
akwizgran
28fd84b261 Merge branch '632-badtokenexception-if-rss-error-dialog-is-show-after-activity-is-destroyed' into 'master'
Only show RSS Feed Import Failed Dialog when Activity lives

Closes #632

See merge request !303
2016-09-07 12:36:12 +00:00
Torsten Grote
91e529a9e9 Merge branch 'socks-socket' into 'master'
Fetch RSS feeds via Tor

This patch replaces jsocks with our own minimal SOCKS 5 implementation, which is compatible with Android's OpenSSL hacks (see discussion on #599 for the horrifying details). This allows us to use OkHttp over Tor to fetch RSS feeds.

It turns out that SOCKS 5 without authentication is a really simple protocol: https://tools.ietf.org/html/rfc1928

Closes #599.

See merge request !308
2016-09-06 18:37:38 +00:00
akwizgran
74f9a0dd73 Use our own SOCKS implementation to talk to Tor. 2016-09-05 19:59:22 +01:00
Torsten Grote
0deac1d1b6 Only show RSS Feed Import Failed Dialog when Activity lives 2016-09-02 11:12:24 -03:00
akwizgran
387e44d114 Merge branch '496-implement-ui-for-reblogging-and-blog-comments' into 'master'
UI for reblogging and blog comments

This MR wraps all blog posts inside a `CardView` and adds a reblog button to blog posts. When this button is pressed, a new activity opens that shows the blog post again and allows the user to reblog it into their own blog. An optional comment can be added.

Also a new compound view `AuthorView` is introduced to display authors and their trust level in a consistent way.

The `BlogController` has been refactored, so the `FeedController` can share most code through an abstract base class.

![reblog2](/uploads/ce4764851c4cbe39684c95a3b427e3a2/reblog2.gif)

Closes #496, #437 

See merge request !300
2016-09-02 11:16:28 +00:00
akwizgran
bb00412187 Added @UiThread annotations, minor code cleanups. 2016-09-02 11:53:16 +01:00
Torsten Grote
bb0a2a5b32 Add a scene transition animation when reblogging a blog post 2016-09-02 11:53:16 +01:00
Torsten Grote
6d7e0aab07 Reblogging and Comment UI 2016-09-02 11:53:08 +01:00
Torsten Grote
da08072409 Make the user's own identities visually distinct
Closes #593
2016-09-02 11:52:34 +01:00
Torsten Grote
9664aea520 Introduce and use CardView and AuthorView for Blog Posts 2016-09-02 11:52:34 +01:00
akwizgran
636b587b9c Merge branch '605-add-database-method-for-retrieving-a-contact-by-local-and-remote-author-ids' into 'master'
Add database method for retrieving a contact by local and remote author IDs

Closes #605

See merge request !302
2016-09-01 20:00:27 +00:00
akwizgran
0afab09fdf Merge branch '616-continue-button-is-off-screen-when-adding-a-contact' into 'master'
Scroll down Adding Contact screen

Normally, you would introduce a new layout only for small screens, but in this case it is easier and has less maintenance overhead to just scroll down the screen, so the button is always visible after loading.

While I was at it, I also replaced `getLocalAuthors()` by the new `getLocalAuthor()`.

Closes #616

See merge request !294
2016-09-01 19:54:31 +00:00
Torsten Grote
fe4f71fe0f Remove lots of unused code for identity selection 2016-09-01 16:13:55 -03:00
Torsten Grote
6f0ffa8439 Add database method for retrieving a contact by author ID
and use it for retreiving the status of an author faster.
Also add tests for both.
2016-09-01 14:06:38 -03:00
Torsten Grote
69dd399bd2 Scroll down Adding Contact screen
Closes #616
2016-09-01 12:16:26 -03:00
akwizgran
8b7304f4cb Merge branch '599-fetch-rss-feeds-via-tor' into 'master'
Factor out Tor Socks Port

This MR factors out the local Tor port, so other clients can listen to an `TransportEnabledEvent` for Tor and start tasks as soon as Tor becomes available. This would also enable client to pass traffic through Tor's local SOCKS proxy.

See merge request !301
2016-09-01 11:57:13 +00:00
Torsten Grote
e023e5d8fc Start RSS Feed Fetcher only after TransportEnabledEvent for Tor 2016-09-01 12:55:25 +01:00
akwizgran
042050453a Merge branch '359-introduction-message-can-be-overlooked' into 'master'
Attach optional messages to invitations in Conversation view

![device-2016-08-29-115823](/uploads/e819324046b8a37ff06da7300046369c/device-2016-08-29-115823.png)![device-2016-08-29-115834](/uploads/051b4b64938bfa6f3ed610db28909865/device-2016-08-29-115834.png)

Closes #359

See merge request !299
2016-09-01 11:43:18 +00:00
akwizgran
1c15e690e1 Merge branch '352-conversation-screen-has-too-much-padding' into 'master'
Improve conversation screen graphics with less padding

This is how the conversation screen looks with this MR:

![1](https://code.briarproject.org/akwizgran/briar/uploads/3078636c93f7edc6b07034ad808ffc7c/device-2016-08-26-105325.png)
![2](https://code.briarproject.org/akwizgran/briar/uploads/fe0dcd3b1cbc6593aabed6faab1801d7/device-2016-08-26-105425.png)

This MR also replaces more raster graphics with vector graphics.

Closes #352

See merge request !298
2016-09-01 11:37:10 +00:00
Torsten Grote
61c05c1dd4 Fix tests broken by latest merges! 2016-08-31 11:32:53 -03:00
akwizgran
d8a9d83caf Merge branch '494-implement-backend-for-reblogging-and-blog-comments' into 'master'
Add support for comments and reblogging to Blog Client

Comments and reblogs need to depend on the post they refer to.
Since message dependencies are limited to one group,
the post and also the comments need to be wrapped
when commented on or reblogged to another blog (and group).

For this reason, in addition to comments, two new wrapping message types
are introduced. They retain all data of the original messages and allow
for reconstruction and signature verification.

This MR breaks backwards compatibility with old blog posts.
It removes the content type, title and parent ID from the post.

Furthermore, it includes one commit that replaces the `Message` in `MessageSharedEvent` with a `MessageId`.

Closes #494

See merge request !285
2016-08-30 23:09:31 +00:00
akwizgran
70a44e8a27 Merge branch '364-introduction-responses-should-be-signed' into 'master'
Sign Introduction Information to be able to discover MITM attack

The local introducee doesn't know whether each piece of information received from the introducer originates from the remote introducee or has been replaced by the introducer, i.e. whether the introducer is carrying out a man-in-the-middle attack.

The introduction protocol doesn't aim to detect or prevent man-in-the-middle attacks. We only aim to establish that if the remote identity public key is not replaced then the remote ephemeral public key, transport properties and timestamp are not replaced either. This MR adds a MAC and a signature to the introduction protocol's ACK message to fulfill that aim. See #364 for the detailed security argument.

Later, when the local introducee verifies that the remote identity public key belongs to a particular person (#513), she can also be sure that the remote ephemeral public key, transport properties and timestamp originated from that person.

Closes #364

See merge request !297
2016-08-30 23:05:25 +00:00
Torsten Grote
fc5a7290e3 Calculate and verify signature and MAC for Introduction ACKs
Before the introducee sends her ACK,
she derives a master key from the ephemeral shared secret as before.

Two nonces and a MAC key are then derived from the master key.
The local introducee signs one of the nonces and calculates a MAC
over her own identity public key, ephemeral public key,
transport properties and timestamp.
The local introducee includes the signature and MAC in her ACK.

On receiving the remote introducee's ACK,
the local introducee verifies the signature and MAC.
Should the verification fail, an ABORT is sent to the introducer and
the remote introducee that was added as inactive is deleted again.
2016-08-30 19:58:54 -03:00
Torsten Grote
7db0e4472a Introduction Client: Add MAC and signature to ACK message
The MAC and signature are not yet generated and verified.
This will happen in a later commit.
2016-08-30 19:25:53 -03:00
Torsten Grote
65bdd5558e Address bugs and comments from reblogging code review 2016-08-30 18:52:33 -03:00
Torsten Grote
3dd3a18694 Add support for comments and reblogging to Blog Client
Comments and reblogs need to depend on the post they refer to.
Since message dependencies are limited to one group,
the post and also the comments need to be wrapped
when commented on or reblogged to another blog.

For this reason, in addition to comments, two new wrapping message types
are introduced. They retain all data of the original messages and allow
for reconstruction and signature verification.

This commit breaks backwards compatibility with old blog posts.
It removes the content type, title and parent ID from the post
message structure.
2016-08-29 13:37:20 -03:00
Torsten Grote
743fc7dd1f Do not require an entire Message for the MessageSharedEvent 2016-08-29 13:36:09 -03:00
akwizgran
eb3da2aac9 Merge branch '539-564-568-notification-overhaul' into 'master'
Fix various notification bugs

Fixes #539, #564, #568.

Depends on !276.

See merge request !286
2016-08-29 16:27:47 +00:00
Torsten Grote
4518f59a54 Improving notices with messages attached in conversation view 2016-08-29 12:01:51 -03:00
Torsten Grote
11c0cb667f Improve conversation screen graphics with less padding
Also replace more raster graphics with vector graphics.
2016-08-29 10:02:15 -03:00
Torsten Grote
132a03d0a9 Merge branch '364-add-mac-to-crypto-component' into 'master'
Add MAC function to crypto component



See merge request !295
2016-08-26 13:34:56 +00:00
Torsten Grote
c666b0493c Merge branch '618-bdf-dictionary-iteration-order' into 'master'
Define iteration order of BdfDictionary

Closes #618

See merge request !296
2016-08-26 13:29:06 +00:00
akwizgran
625276067a Define iteration order of BdfDictionary. 2016-08-26 10:57:57 +01:00
akwizgran
30f2c192c6 Added MAC function to crypto component. 2016-08-26 10:06:24 +01:00
Torsten Grote
55602ed76a Merge branch '614-dev-reporter-does-not-close-stream' into 'master'
Use Briar's IoUtils.copy(), not H2's IOUtils.copy()

Our implementation closes both streams, H2's implementation leaves them open.

Closes #614.

See merge request !293
2016-08-25 13:11:54 +00:00
akwizgran
4ad0df2640 Use Briar's IoUtils, not H2's IOUtils. 2016-08-25 11:57:21 +01:00
Torsten Grote
d93f59b4ef Merge branch '555-blog-controller' into 'master'
Blog controller thread safety

This patch removes the mutable list of posts from the blog controller to make it thread-safe, and adds a cache of message bodies to speed up reloads.

Closes #555.

See merge request !276
2016-08-24 19:36:06 +00:00
akwizgran
c5f0272621 Merge branch '597-gradle-connectedcheck-fails-due-to-method-limit' into 'master'
Cleanup Gradle and Proguard to fix connectedCheck

Closes #597

See merge request !284
2016-08-24 17:22:30 +00:00
akwizgran
419aa2e97e Merge branch '311-audit-crash-report-and-feedback-fields-for-sensitive-or-identifying-information' into 'master'
Remove sensitive information from crash and feedback reports

This depends on MR !290 and removes also the crash report settings.

Closes #311

See merge request !291
2016-08-24 17:20:49 +00:00
akwizgran
015e45752e Merge branch '592-scrub-addresses-before-logging-them' into 'master'
Scrub addresses before logging them

MAC, IP and onion addresses are now scrubbed before logging to ensure we don't leave any sensitive information in plaintext on the device or send it in crash reports or feedback.

* Bluetooth MAC addresses keep the first and last octets
* IPv4 addresses keep the first and last octets
* IPv6 addresses should be scrubbed completely (couldn't test)
* Onion addresses keep the first three characters

If an address is invalid it will not be scrubbed to enable debugging, because it is most likely not sensitive.

Closes #592

See merge request !290
2016-08-24 17:18:48 +00:00
Torsten Grote
743053930a Remove crash report settings
Closes #311
2016-08-24 13:33:03 -03:00
Torsten Grote
cc7602e566 Remove sensitive information from crash and feedback reports 2016-08-24 13:24:12 -03:00
Torsten Grote
8b56e082b3 Scrub IP addresses before logging 2016-08-24 13:22:28 -03:00
akwizgran
b4889fe293 Merge branch '483-design-ux-for-importing-an-rss-feed' into 'master'
Add feed title to imported entries

Also fixes one bug where a new feed was not saved and improved HTML stripping a bit.

Closes #483

See merge request !287
2016-08-24 16:15:14 +00:00
Torsten Grote
ca094620d8 Scrub Bluetooth MAC addresses before logging 2016-08-24 12:47:20 -03:00
Torsten Grote
83be5c766e Scrub onion addresses from log 2016-08-24 12:47:20 -03:00
Torsten Grote
72fb4e9bc7 Post RSS entries within one transaction
This also fixes a bug where new feeds was not added properly.
2016-08-24 12:39:04 -03:00
Torsten Grote
e10f68b496 Add feed title to imported entries
Also fixes one bug where a new feed was not saved and
improved HTML stripping a bit.
2016-08-24 11:20:45 -03:00
Torsten Grote
22e7ec5b27 Merge branch 'gradle-2.14.1' into 'master'
Upgrade gradle to 2.14.1 and gradle plugin to 2.1.3.



See merge request !292
2016-08-24 13:44:47 +00:00
akwizgran
3bccdfa947 Upgraded gradle to 2.14.1 and gradle plugin to 2.1.3. 2016-08-24 11:06:49 +01:00