Commit Graph

10666 Commits

Author SHA1 Message Date
Dan Maas
4fef9fe9ea Update NOTICE.txt (#10218)
(this is the automated NOTICE.txt update for February 2019)

- add new dependencies (willnorris/imageproxy, Masterminds/squirrel)
- misc copyright owner updates
2019-02-09 10:44:14 +01:00
Christopher Speller
03a96d71d8 Fixing plugin API not having proper access to Cluster. (#10257) 2019-02-08 18:13:52 -08:00
Harrison Healey
4dbeaffdf0 MM-14037 Ensure deprecated image proxy settings are read correctly (#10249) 2019-02-08 10:08:36 -05:00
Harrison Healey
3a8e8739b2 MM-13996 Properly get image dimensions for OpenGraph images using secure_url (#10240)
For images in the OpenGraph metadata, we only looked for the `url` field, but we should've also been looking for the `secure_url` field for sites that defined it. We also set the `secure_url` field when proxying OpenGraph images as well, so we were not properly giving image dimensions for OpenGraph images.

#### Ticket Link
https://mattermost.atlassian.net/browse/MM-13996
2019-02-07 19:43:25 +01:00
Joram Wilander
5cc767fc1b Do not update channel message count for team add/remove message (#10225) 2019-02-07 12:32:38 -05:00
Yusuke Nemoto
06f384df6d Enable PluginJobs (#10198) 2019-02-06 08:25:07 +01:00
Carlos Tadeu Panato Junior
ac68236b88 add fallback to master (#10235) 2019-02-05 13:07:44 -08:00
Carlos Tadeu Panato Junior
5172591437 use $env.CHANGE_TARGET when switch branch (#10228) 2019-02-05 17:10:44 +01:00
tauu
bfe33d683b Fixed login hooks not being called during first OAuth login (#10206)
* Fixed login hooks not being called during first OAuth login

* prevent call AddUserToTeamByTeamId twice for new users in LoginByOAuth
2019-02-05 16:27:54 +01:00
Martin Kraft
afcb224a79 Adds configuration for separate reply-to email header. (#10144)
* Adds configuration for separate reply-to email header.

* Changes config setting name.

* Using a separate variable and value in test.

* Updates for config pointer changes in another PR.

* Adds new key to test config. Adds default value.
2019-02-04 17:01:05 -05:00
Daniel Schalla
ba7ab0b8d1 Indicate incorrect password compared to empty / invalid password field in the error response (#10223) 2019-02-04 18:54:57 +01:00
Harrison Healey
dbf54b3599 MM-13838 Bypass the HTTP client when getting image dimensions from the image proxy (#10208)
* MM-13838 Bypass the HTTP client when getting image dimensions from the proxy

* Add additional log messages to debug failing test

* Fix unit test to work on Jenkins
2019-02-04 12:43:30 -05:00
Daniel Schalla
85c60f1402 [MM-13839] Check for password when updating the eMail (#10207)
* Check for password when updating the eMail

* Require password for email change

* Enhance unit testing

* Restructure error handling for update email path

* govet
2019-02-01 19:06:49 -04:00
Martin Kraft
9a3dc21adc Changes signature of FirstLoginSync function. (#10211)
* First login fix (2).

* Adds cautionary note about 'sanitized' fields.
2019-02-01 18:37:11 -04:00
Daniel Schalla
145fa9a57b [MM-13891] Enable team domain restriction for AuthService users (#10209)
* Enable team domain restriction for AuthService users

* govet
2019-02-01 18:28:35 -04:00
Harrison Healey
46b05499cc MM-13932 Fix image metadata for invalid image links (#10217) 2019-02-01 18:23:04 -04:00
Daniel Schalla
a2f46c0466 [MM-13889] Limit OpenGraph data response size (#10213)
* Limit OpenGraph data response size

* Add LimitReader to Metadata Image
2019-02-01 18:55:43 +01:00
Christopher Speller
4e0840969b MM-13923 Fixing pulling from incorect cache. (#10216)
* Fixing pulling from incorect cache.

* Adding caching test.
2019-02-01 08:13:51 -08:00
Simone Salsi
0f35c4b24d [MM 12458] Include user preferences in bulk export (#9784)
* First version of the preference exporter

* First working version of the preference export

* Removed useless debug line

* Added special case of empty string to harverst the omitempty feature

* Removed dangling line from rebase

* Moved exportablepreference in scope

* Fix go vet issue

* Fix formating

* Add simple test

* Add full test for BulkExportUsers

* Improve variable naming
2019-02-01 11:43:41 +00:00
Harrison Healey
ee9395f1b6 MM-13917 Enable post metadata by default (#10210) 2019-01-31 14:57:50 -05:00
Daniel Schalla
7cc66ee1d4 [MM-10346] CSRF Token Implementation + Tests (#10067)
* CSRF Token Implementation + Tests

Remove debug statements

Implement requested changes

* Fix non-cookie authentication methods stripping auth data from requests

* Fail when CSRF cookie is not returned as part of login
2019-01-31 20:39:02 +01:00
Carlos Tadeu Panato Junior
86aa01cf36 fix test (#10212) 2019-01-31 13:07:49 -04:00
Christopher Speller
51ef1ee32f Adding telemetry for slash commands, and webhook counts. (#10202) 2019-01-31 09:02:16 -08:00
Harrison Healey
7c677b6196 MM-13207 Add customizable timeout for link metadata and improve caching of errors (#10188)
* MM-13207 Add customizable timeout for link metadata and improve caching of errors

* Rename LinkMetadataTimeout to LinkMetadataTimeoutMilliseconds

* Add diagnostics for LinkMetadataTimeoutMilliseconds
2019-01-31 09:40:23 -05:00
Joram Wilander
2ca222033c MM-10658 Change config fields to pointers (#9033)
* MM 10658 Change config fields to pointers (#8898)

* Change fields of config structs to pointers and set defaults

MM-10658 https://github.com/mattermost/mattermost-server/issues/8841

* Fix tests that go broken during switching config structs to pointers

MM-10658 https://github.com/mattermost/mattermost-server/issues/8841

* Apply changes of current master while switching config structs to pointers

MM-10658 https://github.com/mattermost/mattermost-server/issues/8841

* Fix new config pointer uses

* Fix app tests

* Fix mail test

* remove debugging statement

* fix TestUpdateConfig

* assign config consistently

* initialize AmazonS3Region in TestS3TestConnection

* initialize fields for TestEmailTest

* fix TestCheckMandatoryS3Fields
2019-01-31 08:12:01 -05:00
Hanzei
0c981aa010 Prohibit variable shadowing (#10177)
* Prohibit variable shadowing

* Fix outstanding shadowed variables
2019-01-31 12:16:16 +01:00
Deep Vora
cd30a1f242 MM-12375 added webhook show command (#10123)
MM-12375 added tests for webhook show command
2019-01-31 11:07:42 +00:00
Hanzei
d898787371 Fix shadowed variables in various places: Part 1 of 2 (#10175)
* Fix shadowed variables in cmd package

* Fix shadowed variables in plugin package

* Fix shadowed variables in store package

* Fix shadowed variables in web package

* Changes as requested

Signed-off-by: Hanzei <hanzei@mailbox.org>

* Fix build

* Remove unnessary statements

* Use require all the time

* Fix build

* Rename variables according to feedback

* Fix NPE

* Changes as requested
2019-01-30 12:55:24 -05:00
dom3k
2c9cf41dad [MM-13747] Add ability to list users to plugin API (#10102)
* add GetUsers in plugin api

* change GetUsers(page int, perPage int) ([]*model.User, *model.AppError) to GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)

* Update GetUsers doc

Co-Authored-By: dom3k <szeptweb@gmail.com>

* Update doc in plugin/api.go

Co-Authored-By: dom3k <szeptweb@gmail.com>

* correct database initialization for the test

* Update plugin/api.go

Co-Authored-By: dom3k <szeptweb@gmail.com>
2019-01-30 12:55:02 -05:00
Jesse Hallam
2c3a2e9235 Query builder (#10104)
* add query builder to facilitate dynamic SQL construction

* leverage query builder to refactor user store

This is partially setup work for MM-13120, but merged to master to avoid
further conflicts.

* fix unrelated unit test breakage

* documentation tweaks

* Apply suggestions from code review

Co-Authored-By: lieut-data <jesse.hallam@gmail.com>

* prefer comma separated case options to fallthrough

* vendor github.com/Masterminds/squirrel and deps

* switch to using github.com/Masterminds/squirrel

* rm querybuilder
2019-01-29 15:24:57 -05:00
kosgrz
099e6f74f3 MM-13851 Added a UserWasCreated hook for server-side plugins (#10178) 2019-01-29 18:40:48 +01:00
Carlos Tadeu Panato Junior
d4250f50d8 DB upgrades (#10190)
* uncoment db upgrade to 5.8.0

* add preparatory code for db upgrade 5.9.0

* fix versions

* Update store/sqlstore/upgrade.go

Co-Authored-By: cpanato <ctadeu@gmail.com>
2019-01-29 11:14:00 -05:00
Jesús Espino
d1a758a06e MM-13873: Fix race condition on filesystem licence load (#10196) 2019-01-29 07:57:38 -08:00
Hanzei
8e44f38499 MM-13852 Migrate example manifest to JSON (#10197)
* Migrate example manifest to JSON

* Changes as requested
2019-01-29 07:55:58 -08:00
Gabriel Jackson
58ef6853f1 MM-12359 Add 'command show' CLI command (#10073)
* MM-12359 Add 'command show' CLI command

This new CLI command prints out the detailed information of a given
slash command.

* Fix typo in error returned when moving slash commands

* Move prettyPrint CLI functions to util

* Move prettyPrint CLI tests to util
2019-01-29 08:01:24 +01:00
Hanzei
179e98c245 Fix shadowed variables in various places: Part 2 of 2 (#10176)
This PR fixes shadowed variables in the following packages:
- `app`
- `utils`
- `utils/markdown`
- `services/mailservice`
2019-01-28 21:57:45 +01:00
George Goldberg
58b2a3d16e MM-13796: Don't allow pin/unpin in read-only town square. (#10184) 2019-01-28 20:42:49 +01:00
Miguel de la Cruz
48048f9e95 Starts Elasticsearch and Metrics when running the server. (#10182) 2019-01-28 08:27:46 -08:00
Harrison Healey
26684716aa MM-13664 Cache external link metadata when populating post metadata (#10128)
* MM-13664 Added LinkMetadata types

* MM-13664 Use LinkMetadata when populating post metadata

* Fix unused import

* Fix index name on SQLite

* Finish adding unit tests

* Address feedback

* Increase max length of URL column to 2048 characters
2019-01-28 16:25:08 +01:00
Carlos Tadeu Panato Junior
5c76e90a83 Add timeout for jenkins pipeline (#10180)
* Add timeout for jenkins pipeline

* setting timeout to 1 hour
2019-01-28 14:51:25 +01:00
Elias Nahum
98af5794ad translations PR 20190121 (#10126) 2019-01-28 09:28:39 -03:00
Ashutosh Kumar
9b952dce27 Team restore cli command (#9551)
Adds cli for team restore and team archive.
2019-01-28 13:04:19 +01:00
Daniel Schalla
144686148b Fix order of post list returned (#10183) 2019-01-28 12:20:05 +01:00
Christopher Speller
ce2c7110d3 Switching redirect_location route to use httpservice client and adding caching. (#10118) 2019-01-27 18:24:46 -08:00
Daniel Schalla
b890f8d007 [MM-13820] Optimize flagged post handling in preferences and web handler (#10135)
* Optimize flagged post handling in preferences and web handler
2019-01-26 20:02:46 +01:00
Carlos Tadeu Panato Junior
94e45c3466 add output when creating users using CLI (#10140)
* add output when creating users using CLI

* update per feedback

* update per feedback 2
2019-01-26 17:28:35 +01:00
Carlos Tadeu Panato Junior
0ed9fad78c add output when creating channel using cli (#10138)
* add output when creating channel using cli

* update per feedback
2019-01-26 17:08:21 +01:00
Carlos Tadeu Panato Junior
244e1a5a7a add output when creating webhooks with the CLI (#10139)
* add output when creating webhooks with the CLI

* update per feedback

* update per feedback
2019-01-25 09:39:43 -08:00
Hanzei
6d733e35f7 Fix panicing of ParseSlackAttachment for nil in attachments list (#10141) 2019-01-25 09:31:19 -08:00
Hanzei
c8fab6e313 Fix shadowed variables in app package: Part 1 of 3 (#10000)
* Fix shadowed variables: Part 1

* Remove additional variable

* Fix tests

* Refactor JoinDefaultChannels
2019-01-25 17:40:56 +01:00