Commit Graph

138 Commits (21325bc922908ce3284c4392305e2abbfeadf934)

Author SHA1 Message Date
Scott Nonnenberg 1c455c83e0
Set parent window for about/new version, escape to close (#1795)
* Set parent window for about/new version, escape to close

* Exclude jquery from jshint run
7 years ago
Lilia af8b0164b5 Move to node fetch API for web requests instead of XHR (#1552)
* Use node-fetch instead of xhr

* Remove XMLHttpRequest.js

// FREEBIE

* Avoid calling json() on non json responses

Previously we would catch and swallow JSON parsing errors resulting from an
empty response, though empty responses are normal from a few endpoints, like
requesting sms or voice registration codes.

Since the JSON parsing call is now handled internally by node-fetch, we have to
keep closer track of our expected response type to avoid throwing an exception.

// FREEBIE
8 years ago
Scott Nonnenberg 7e328bcacd Deployment: No longer use CI windows assets, include about.html (#1564)
* Include about.html in production Electron build

* Remove windows from fetch-release task, fix permissions

We no longer use the pre-built assets from AppVeyor for our Windows
build.

* AppVeyor: Remove capture/upload of built assets
8 years ago
Scott Nonnenberg b64f2969fd Better handling of network disconnection/reconnection (#1546)
* Ensure that our preload.js setImmediate call finds right function

FREEBIE

* Our own socket close event, better logging, unregistration

FREEBIE

* Return CLOSED for NetworkStatusView if we've fully disconnected

* background.js: Remove messageReceiver = null, log in connect()

A null messageReciever makes the NetworkStatusView think we're online.

FREEBIE
8 years ago
Lilia 670d2afa69 Standardize artifact names - include platform name (#1539)
* Standardize artifact names

// FREEBIE

* Update name of windows asset in Grunt fetch-release task

FREEBIE
8 years ago
lilia 234e9c14e0 Remove manifest.json from Gruntfile 8 years ago
Scott Nonnenberg 4c48d12dc3
Remove unused grunt tasks: sauce labs and connect
We can't run our tests in a standalone server anymore, so no need for
connect.

Similarly, sauce labs is no longer necessary because all of our tests
are run locally inside of Electron.

FREEBIE
8 years ago
Scott Nonnenberg 9040677d3c Update our release scripts to match changes in electron-builder (#1484)
No more win-unpacked/linux-unpacked, so we need to extract downloaded
zips into their own folders manually.

FREEBIE
8 years ago
Scott Nonnenberg 02571b7ae9
Copy audio-related files into js/ instead of symlinking them (#1456)
This adds a new copy:deps task into the overall default task, and it
needs to be run before running the product for the first time, and after
upgrading audio-related deps.

FREEBIE
8 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
8 years ago
David Balatero eb6aed421a
Ensure we are grabbing the right build artifact 8 years ago
lilia 16753d6c6f
Add grunt todo 8 years ago
lilia 349b6ce245
Add release test for auto updater config
Without this file, clients would be stranded on the current version forever.
This change extends release-test to verify its presence in a packaged build.

// FREEBIE
8 years ago
Scott Nonnenberg f4aa6d93a7
Capture and display browser logs when unit tests fail 8 years ago
Scott Nonnenberg fd7372e67e
Fixes for appveyor build: path formats, correct electron binary 8 years ago
Scott Nonnenberg fd8b8910a3
Eliminate HIDE_DEV_TOOLS environment variable. Hide in test env.
FREEBIE
8 years ago
Scott Nonnenberg f43a5986da
Increase unit-tests timeout, improve error display, add set -e
FREEBIE
8 years ago
Scott Nonnenberg cb296fcfaa
Cleanup: Add unit-tests task to grunt test, fix style checks
And improve success logging in unit-tests.

FREEBIE
8 years ago
Scott Nonnenberg 5635095d1a
Initial version of `grunt unit-tests`, tests from command-line
FREEBIE
8 years ago
lilia 2a7993309a
Fix build bucket path 8 years ago
lilia cf9523f1f8
Restructure prep-release script slightly
Order of operations is now:
- regenerate local assets
- clean the release dir
- download linux/windows releases
- build osx release
- smoke all test releases

// FREEBIE
8 years ago
lilia ab8edd8690
Add spectron tests to grunt:test-release
// FREEBIE
8 years ago
lilia bc71f4aa2b
CI builds and uploads all targets
// FREEBIE
8 years ago
lilia 9fe6bce0cc
Add task to download releases from s3
// FREEBIE
8 years ago
lilia 81d8b78d05
Switch to grunt-sass + node-sass-import-once
These modules together allow us to import css files from third party
components without maintaining symlinks that essentially rename them as
sass partials, which doesn't work on windows.

// FREEBIE
8 years ago
lilia 65362e9a81
Temporarily remove sauce from the build 8 years ago
lilia 112f5a00ca
Delete unused files
// FREEBIE
8 years ago
lilia 7627bddcfa
Update default grunt task 8 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
8 years ago
Scott Nonnenberg 9db0a58260 Whenever adding something to a queue, include a timeout
No more wedged queues!

FREEBIE
8 years ago
Scott Nonnenberg 7b55fde92d Gruntfile: Remove firefox target in sauce labs task
FREEBIE
8 years ago
Scott Nonnenberg bd0050b6c6 Cache messages on receipt, remove from cache when processed
FREEBIE
8 years ago
lilia 1f7ef8529c Fix missing emojis in production build
Grunt was failing to pack emoji images into dist.

// FREEBIE
8 years ago
lilia 611bbaef35 Don't hardcode the attachment server url
There may come a day when we may need to change this url from the server
side. On that day, clients should continue to operate normally. The
service should be able to change attachment server locations without
requiring a client update.

// FREEBIE
8 years ago
lilia e4a84d6850 Remove unused html file 8 years ago
lilia b1a37da68b Add audio to prod build
// FREEBIE
8 years ago
lilia 0487fa3cd1 Add server fallback port 8443
// FREEBIE
9 years ago
lilia 4f46a164ba Add voice notes
// FREEBIE
9 years ago
lilia 186c597e24 Use port 4433 on staging
Now with over 9000% more CA-signed cert!

// FREEBIE
9 years ago
lilia 58452066aa Move device storage methods to outgoing message
This is the only place they are called.

// FREEBIE
9 years ago
lilia ffa702c934 Update libsignal-protocol v0.9.0
* Exposes crypto APIs.
* Move worker methods to libsigna.worker.
* Move ProvisioningCipher to libtextsecure.
9 years ago
lilia b160556d6e Change filename
// FREEBIE
9 years ago
lilia c1e1dd97ba Change libsignal-protocol filenames
// FREEBIE
9 years ago
lilia b1d370755a Rename AxolotlStore
// FREEBIE
9 years ago
lilia c442a02cb6 Add build support for expiring old releases
Builds expire after 90 days.
9 years ago
lilia 0247a885ef Fix up locale-patch
// FREEBIE
9 years ago
lilia 4f3d1ed55a Reorder grunt watch tasks
Move style and syntax checks to the end.

// FREEBIE
9 years ago
lilia 173e037fa6 Fix minor style errors
And keep it that way, by making jscs config more opinionated.

// FREEBIE
9 years ago
lilia b09cb228f7 Disallow trailing whitespace
// FREEBIE
9 years ago
lilia 015bbdacc7 Run jshint on more things
// FREEBIE
9 years ago