Commit Graph

9588 Commits

Author SHA1 Message Date
Chris
fbef16f863 Merge branch 'release-4.7' into rm-willnorris-proxy-support 2018-02-12 18:36:39 -06:00
Derrick Anderson
32c1f7be23 Merge branch 'release-4.7-revertmaster' into release-4.7 v4.7.0-rc2 2018-02-12 16:13:01 -05:00
Derrick Anderson
c209e44574 revert master changes 2018-02-12 16:01:02 -05:00
Derrick Anderson
62efb1df75 Merge branch 'icu669' into release-4.7 2018-02-12 15:10:22 -05:00
Derrick Anderson
efd620d6c8 Merge branch 'release-4.7' into icu669 2018-02-12 15:09:59 -05:00
Christopher Brown
56f49cf486 poke jenkins 2018-02-12 13:44:27 -06:00
Christopher Brown
141cfd2f9b remove willnorris/imageproxy support 2018-02-12 13:05:01 -06:00
Chris
1ae680aefa Merge branch 'master' into release-4.7 2018-02-12 12:02:54 -06:00
Pierre de La Morinerie
07fd7aeeb8 Add tests for the platform server command (#8231)
* Cleanup app state on initialization error

When returning an initialization error, the app state was not cleaned
up. This is especially visible during tests, as `appCount` is not
decremented, and makes the new app initialization fail.

* Test the `platform server` command

As the `platform server` command only exits when interrupted by
a signal, it is not possible to test it as the other cobra
commands. Instead we directly test the actual command function.

The internal command handler is slighly refactored to take
a channel in argument, and registers it as the signal handler.
Nothing very different—except than controlling this channel
from the outside allows the test to send the system signal
itself, thus preventing the server to run forever.
2018-02-12 08:46:32 -08:00
Jonathan
9707ac3aaf Added invite_id field to email invite url, along with validation of this field on the server (#8235) 2018-02-12 09:16:17 -05:00
Harrison Healey
87fb19b827 Fixed typo in unit test 2018-02-12 08:58:38 -05:00
Christopher Brown
c1b6e8792c minor addition to #8238 2018-02-09 20:08:39 -06:00
Joram Wilander
3e0c3eff9f ABC-228 Update GetPosts caching to work for non-60 limits (#8233)
* Update GetPosts caching to work for non-60 limits

* Only cache on limits of 30/60 and add test

* Add comments clarifying 30 and 60 limits
2018-02-09 14:47:22 -08:00
Chris
396e7513ec Don't proxy same-site image urls (#8238)
* don't proxy same-site urls

* fix empty site url case
2018-02-09 15:41:06 -06:00
Chris
a4e9499714 Add /v4/image api (#8230)
* add image api

* i suppose i should add a test...

* only redirect to image proxy
2018-02-09 13:59:17 -06:00
Chris
0daac7e4fc Add /v4/image api (#8230)
* add image api

* i suppose i should add a test...

* only redirect to image proxy
2018-02-09 11:56:11 -08:00
Derrick Anderson
e7b084842a Merge branch 'release-4.7' 2018-02-09 12:59:56 -05:00
Chris
a6309aaf48 Remove license globals entirely (#8229)
* remove license globals entirely

* fix infinite recursion

* test fix
2018-02-09 10:04:48 -06:00
Harrison Healey
e2b5f9217f ICU-669 Handle relative links better 2018-02-09 10:05:23 -05:00
Chris
7e8106b95c use mattermost fork of go-bindata (#8216) 2018-02-08 19:43:27 -05:00
Derrick Anderson
1b064c674a Add prepatory code for 4.8.0 (#8226)
* Add prepatory code for 4.8.0

* formatting issue

* build bug
2018-02-08 12:12:48 -05:00
Chris
cf929476bd fix client4 post sanitization (#8219) 2018-02-08 11:54:45 -05:00
Harrison Healey
d3a0e561c2 ICU-669 Ensured all URLs returned from OpenGraph are absolute 2018-02-08 10:45:25 -05:00
Derrick Anderson
9bf23ece6c Merge branch 'abc-239' into release-4.7 2018-02-08 10:05:01 -05:00
Derrick Anderson
f28ee8d7c8 Merge branch 'release-4.7' 2018-02-08 09:08:16 -05:00
Chris
0f703a3368 Eliminate utils.SetLicense calls (#8217)
* eliminate utils.SetLicense calls

* test fix

* another test fix

* more test fixes
2018-02-07 16:20:51 -06:00
JoramWilander
840892ab88 Increase OAuth2 state parameter limit 2018-02-07 16:21:22 -05:00
enahum
654fc2f749 translations PR 20180205 (#8200) 2018-02-07 14:08:42 -05:00
Chris
eff65aa05c ABC-132: sign error page parameters (#8197)
* sign error page parameters

* add comments
2018-02-07 12:05:46 -05:00
Vordimous
7bd298ceaa PLT-7537: Move channel CLI command posts system message to channel. (#8161)
* [PTL-7537] implement feature and test

* [PTL-7537] Update feature to post the the room requiring a username flag to be used

* [PTL-7537] update tests with username

* update test to remove changes to the test helper struct

* use the basic team and user
2018-02-07 14:17:18 +00:00
Jonathan
d3e934d07a XYZ-35: Added Support for GlobalRelay Compliance Export Format
* Added username to ChannelMemberHistory struct in anticipation of supporting GlobalRelay in Compliance Export
* Removed translation from debug output - this makes it complicated to use utils functions from tests in the enterprise repo
* Added an advanced email function that allows for greater control over message details. Updated MessageExport config to support GlobalRelay. Added attachment support to InBucket unit tests
* Moving templates in from enterprise to solve test issues
* Added export format to diagnostics
* Changed email attachment code to use FileBackend so that S3 storage is properly supported
2018-02-07 09:02:46 -05:00
Chris
b2ee507793 allow plugins to set command hints (#8214) 2018-02-07 08:21:40 -05:00
Jesús Espino
121712ce5d Remove fmt.Println trace on api4 tests (#8212) 2018-02-07 03:42:55 -06:00
Pierre de La Morinerie
809a16458f Abort on critical error during server startup (#8204)
Only a handful of critical errors are present in the codebase.
They all occur during server startup (in `app.StartServer()`).

Currently, when one of these critical error occurs, it is simpled
mentionned in the logs – then the error is discarded, and the app
attempts to continue the execution (and probably fails pretty quickly in
a weird way).

Rather than continuing operations in an unknow state, these errors should
trigger a clean exit.

This commit rewrites critical startup errors to be correctly
propagated, logged, and then terminate the command execution.
Additionnaly, it makes the server return a proper error code to the
shell.
2018-02-07 02:11:15 -06:00
Harrison Healey
9a73f99885 ICU-715 Change ExperimentalGroupUnreadChannels setting to allow for default on/off (#8211) v4.7.0-rc1 2018-02-06 18:45:14 -05:00
Chris
1ec295f88c add App.License, remove utils.IsLicensed / utils.License calls (#8203) 2018-02-06 17:25:49 -06:00
Pierre de La Morinerie
034dbc07e3 handle RateLimiter initialization errors (#8199)
Previously, an error occuring in NewRateLimiter would return a nil
reference – which would be de-referenced just after, making the server
crash.
2018-02-05 23:27:34 -06:00
Joram Wilander
323d717a40 Uncomment upgrade code for 4.7 (#8201) 2018-02-05 18:11:31 -05:00
Jesse Hallam
d5d1834c04 ABC-173: introduce Normalize(Username|Email) (#8183)
This centralizes the source of truth on the rules for username / email
processing instead of scattering `strings.ToLower` invocations.
2018-02-05 14:56:01 -05:00
Jesús Espino
aaccb1226e Fix sampledata (fake library) bug (#8198) 2018-02-05 12:37:22 -05:00
Jason Blais
31c9877102 Add missing diagnostics for v4.7 (#8195) 2018-02-05 08:18:46 -08:00
Jesse Hallam
81e67f8759 ABC-179: check email verification last (#8172)
* ABC-179: check email verification last

This change changes the authentication checks to be:
* "preflight checks"
** mfa
** not disabled
** login attempts
* password
* "postflight checks"
** email verified

Checking whether the email is verified or not last avoids the weird edge
case where entering any bogus password for an account with an unverified
email shows a message about verifying the email and offering to resend.

* fix invalid unit test assertion

Client.CreateUser returns a user whose password has been sanitized.
Adopt the pattern in the previous assertions to use a new variable name
and test the password on the original model.User object. This didn't
expose any underlying broken behaviour, but the test wouldn't have
caught it if it had regressed.

Also fix a minor typo.
2018-02-05 10:54:13 -05:00
amyblais
45e572870d Update NOTICE.txt (#8175)
* Update NOTICE.txt

* Update NOTICE.txt
2018-02-05 08:29:31 -05:00
Chris
741f11a878 add ImageProxyOptions to default.json (#8193) 2018-02-02 16:35:05 -05:00
Joram Wilander
03a087a871 Update zoom plugin to latest (#8194) 2018-02-02 16:32:14 -05:00
Joram Wilander
70ad8abdcd Fix panic when invalid types used in post props (#8191) 2018-02-02 11:46:49 -08:00
Pierre de La Morinerie
07902b4c91 report server launch errors (#8189)
When starting the server using `platform server`, errors occuring during
startup are not reported in the console. The command exit with a 0 exit
code (i.e. "success"), although the server failed to launch.

With this change, when an error occurs while initializing the app (like
a missing or invalid configuration file):

- the error is printed to the console;
- the command exit with a "-1" exit code.

This allow shell scripts to properly detect the startup failure, and to
react to it.

Example of error displayed:

```
$ platform server
Error: LoadConfig: Error decoding config file=config.json, err=While parsing config: invalid character ':' after top-level value,
``
2018-02-02 11:54:14 -06:00
Chris
2256e23c9e ABC-153: don't use http redirects with 4xx/5xx status codes (#8178)
* don't use http redirects with 4xx/5xx status codes

* minor html syntax fix
2018-02-02 08:29:11 -05:00
Chris
0cd2895456 fix image url replacement for blank urls (#8184) 2018-02-01 18:31:49 -08:00
Saturnino Abril
5d7ae48841 [PLT-8494] Add delete_team websocket event (#8167)
* add delete_team websocket event

* add to PermanentDeleteTeam
2018-02-01 09:46:24 -05:00