Commit Graph

80 Commits (clearnet)

Author SHA1 Message Date
Mikunj e343a04eea Merge commit '18b5b7c046436f2defab2e20407e22da180bf97b' into signal-1.22
# Conflicts:
#	app/sql.js
#	background.html
#	config/default.json
#	js/background.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/modules/data.js
#	js/signal_protocol_store.js
#	js/views/conversation_search_view.js
#	libtextsecure/message_receiver.js
#	libtextsecure/sendmessage.js
#	main.js
#	package.json
#	preload.js
#	test/index.html
#	ts/components/Avatar.tsx
#	ts/components/conversation/ConversationHeader.md
#	ts/components/conversation/ConversationHeader.tsx
5 years ago
Beaudan 531ee92dcb Updated messenger to work with slightly different storage server API and changed swarm requests to go through storage server 5 years ago
Scott Nonnenberg c8ea2e9463 Download and install updates without the help of electron-updater 5 years ago
sachaaaaa 37f0fced29 Show commit hash in About window for beta builds 5 years ago
Beaudan ffdc50c290 lint haha 5 years ago
Beaudan 403df0806b Update the production json to just use the defaults in preparation for having other people try the messenger. Also cleaned up a little log that was incorrect 5 years ago
Scott Nonnenberg 3917ab940e web_api: Fix caching of https.agent objects between requests 5 years ago
Beaudan 6426a5eb9b Added ability to look up our .loki address and now send that with our LokiAddress messages 5 years ago
Beaudan 2bae6b5eed Removed online broadcast message type, changed ttl logic a little, add p2p address and port to the window object when recieve message 5 years ago
Beaudan b417edfc9b Added new protos for online broadcast messages, added db hits for getting friends, local server now instantiated on the window, now sending online broadcast messages when the local server starts 5 years ago
Scott Nonnenberg 813924685e Link Previews 5 years ago
Beaudan 7b1799c418 Big ol' hunk o' chunk. Now using random.snode to populate swarm lists, now making multiple requests from said lists and they are processed as they complete rather than waiting for all to resolve 6 years ago
Beaudan 37ba762312 First stuff for contacting specific nodes for each contact. Hard coded to hit the same bootstrap node for now plus doesn't handle unreachable nodes/errors well yet 6 years ago
Mikunj 7e21deacc3 Undo css change as i'll fix that in another PR.
Point production to a test server.
6 years ago
Mikunj e2a48b8373 Clean up multi instance code. 6 years ago
sachaaaaa f9efd0da68 allow multiple instances running for debugging 6 years ago
Mikunj f589fdac5c Merge signal changes into branch. 6 years ago
Beaudan 519d372e63 Tiny url update to work with the storage server 6 years ago
Scott Nonnenberg a7d78c0e9b Sealed Sender support
https://signal.org/blog/sealed-sender/
6 years ago
jcktm c5ecf8c710 config: change the default server from signal.org to localhost 6 years ago
Scott Nonnenberg f3bd0cf903 Refactor api.js into web_api, which encapsulates all web access 6 years ago
Scott Nonnenberg 426dab85a2
New design for import/install, 'light' import (#2053)
- A new design for the import flow. It features:
  - Icons at the top of every screen
  - Gray background, blue buttons, thinner text
  - Simpler copy
- A new design for the install flow. It features:
  - Immediate entry into the QR code screen
  - Animated dots to show that we're loading the QR code from the server
  - Fewer screens: 1) QR 2) device name 3) sync-in-progress
- When not set up, the app opens directly into the install screen, which has been streamlined. The `--import` command-line argument will cause the app to open directly into the import flow.
- Support for two different flavors of builds - the normal build will open into the standard registration flow, and the import flavor will be exactly the same except during setup it will open directly into the import flow.
- A new design for the (dev-only) standalone registration view
- When these install sequences are active, the OS File menu has entries to allow you to switch the method of setup you'd like to use. These go away as soon as the first step is taken in any of these flows.
- The device name (chosen on initial setup) is now shown in the settings panel
- At the end of a light import, we hand off to the normal device link screen, starting at the QR code. On a full import, we remove the sensitive encryption information in the export to prevent conflicts on multiple imports.
- `Whisper.Backup.exportToDirectory()` takes an options object so you can tell it to do a light export.
- `Whisper.Backup.importFromDirectory()` takes an options object so you can force it to load only the light components found on disk. It also returns an object so you can tell whether a given import was a full import or light import.
- On start of import, we build a list of all the ids present in the messages, conversations, and groups stores in IndexedDB. This can take some time if a lot of data is in the database already, but it makes the subsequent deduplicated import very fast.
- Disappearing messages are now excluded when exporting
- Remove some TODOs in the tests
6 years ago
Scott Nonnenberg c195ba2630
Save prekeys optimistically, track confirms, new clean behavior (#1846)
* Re-enable libtextsecure unit tests, get passing, run in CI

* Save prekeys optimistically, track confirmed, new clean behavior

* Eliminate potential conflicts when rotating on startup

* Remove last symlink: get libtextsecure tests running on windows
7 years ago
Lilia ae190fed44
Profiles (#1453)
* Add AES-GCM encryption for profiles

With tests.

* Add profileKey to DataMessage protobuf

// FREEBIE

* Decrypt and save profile names

// FREEBIE

* Save incoming profile keys

* Move pad/unpad to crypto module

// FREEBIE

* Support fetching avatars from the cdn

// FREEBIE

* Translate failed authentication errors

When AES-GCM authentication fails, webcrypto returns a very generic error. The
same error is thrown for invalid length inputs, but our earlier checks in
decryptProfile should rule out those failure modes and leave us safe to assume
that we either had bad ciphertext or the wrong key.

// FREEBIE

* Handle profile avatars (wip) and log decrypt errors

// FREEBIE

* Display profile avatars

Synced contact avatars will still override profile avatars.

* Display profile names in convo list

Only if we don't have a synced contact name.

// FREEBIE

* Make cdn url an environment config

Use different ones for staging and production

// FREEBIE

* Display profile name in conversation header

* Display profile name in group messages

* Update conversation header if profile avatar changes

// FREEBIE

* Style profile names small with ~

* Save profileKeys from contact sync messages

// FREEBIE

* Save profile keys from provisioning messages

For standalone accounts, generate a random profile key.

// FREEBIE

* Special case for one-time sync of our profile key

Android will use a contact sync message to sync a profile key from Android
clients who have just upgraded and generated their profile key. Normally we
should receive this data in a provisioning message.

// FREEBIE

* Infer profile sharing from synced data messages

* Populate profile keys on outgoing messages

Requires that `profileSharing` be set on the conversation.

// FREEBIE

* Support for the profile key update flag

When receiving a message with this flag, don't init a message record, just
process the profile key and move on.

// FREEBIE

* Display profile names in group member list

* Refresh contact's profile on profile key changes

// FREEBIE

* Catch errors on profile save

// FREEBIE

* Save our own synced contact info

Don't return early if we get a contact sync for our own number

// FREEBIE
7 years ago
Lilia 50c470e53d
Certificate pinning via node XMLHttpRequest implementation (#1394)
* Add certificate pinning on https service requests

Make https requests to the server using node apis instead of browser apis, so we
can specify our own CA list, which contains only our own CA.

This protects us from MITM by a rogue CA.

As a bonus, this let's us drop the use of non-standard ports and just use good
ol' default 443 all the time, at least for http requests.

// FREEBIE

* Make certificateAuthorities an option on requests

Modify node-based xhr implementation based on driverdan/node-XMLHttpRequest,
adding support for setting certificate authorities on each request.

This allows us to pin our master CA for requests to the server and cdn but not
to the s3 attachment server, for instance. Also fix an exception when sending
binary data in a request: it is submitted as an array buffer, and must be
converted to a node Buffer since we are now using a node based request api.

// FREEBIE

* Import node-based xhr implementation

Add a copy of https://github.com/driverdan/node-XMLHttpRequest@86ff70e, and
expose it to the renderer in the preload script.

In later commits this module will be extended to support custom certificate
authorities.

// FREEBIE

* Support "arraybuffer" responseType on requests

When fetching attachments, we want the result as binary data rather than a utf8
string. This lets our node-based XMLHttpRequest honor the responseType property
if it is set on the xhr.

Note that naively using the raw `.buffer` from a node Buffer won't work, since
it is a reuseable backing buffer that is often much larger than the actual
content defined by the Buffer's offset and length.

Instead, we'll prepare a return buffer based on the response's content length
header, and incrementally write chunks of data into it as they arrive.

// FREEBIE

* Switch to self-signed server endpoint

* Log more error info on failed requests

With the node-based xhr, relevant error info are stored in statusText and
responseText when a request fails.

// FREEBIE

* Add node-based websocket w/ support for custom CA

// FREEBIE

* Support handling array buffers instead of blobs

Our node-based websocket calls onmessage with an arraybuffer instead of a blob.
For robustness (on the off chance we switch or update the socket implementation
agian) I've kept the machinery for converting blobs to array buffers.

// FREEBIE

* Destroy all wacky server ports

// FREEBIE
7 years ago
Scott Nonnenberg fd8b8910a3
Eliminate HIDE_DEV_TOOLS environment variable. Hide in test env.
FREEBIE
7 years ago
Scott Nonnenberg b4e3cc0e6c
Load test page and run tests on start when NODE_ENV=test
FREEBIE
7 years ago
lilia e7e030a5e2
Build expiration date
Add the buildExpiration config and add it to the renderer's config
object. Use grunt to write the build expiration to
config/local-production.json which will override the default value (no
expiration) in production. Finally, run this grunt task as part of the
build process.

// FREEBIE
7 years ago
lilia c83dbc1bf0
Rename window.env to window.config
Also normalize to camelCase for configs.

// FREEBIE
7 years ago
lilia 7e1bee1082
Configure app/build using node config
Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.

// FREEBIE
7 years ago