Граф коммитов

11815 Коммитов

Автор SHA1 Сообщение Дата
Jeff Abshire
7600d9c169 Remove a potential tabnabbing attack in a template. (#13024)
My company's security scanner picked up on a potential problem in this
template in our deployed Mattermost instance.

https://www.owasp.org/index.php/Reverse_Tabnabbing
2019-11-08 21:27:37 +01:00
Claudio Costa
c0c47df3f0 Fix data race on server startup (#13006) 2019-11-08 20:37:15 +01:00
larkox
613a015cd0 [GH-13031] Split tests into subtests or table testing for the file "https://github.com/mattermost/mattermost-server/blob/master/model/file_info_test.go" (#13032)
* Split tests into subtests and table testing for 'model/file_info_test.go'

* Improve error messages and fit testify function parameter order
2019-11-08 20:18:30 +01:00
Carlos Tadeu Panato Junior
c2fbcd71d1 Update minio (#12979)
* update minio docker image to latest stable available on 31/10/2019

* update minio-go dependencies
2019-11-08 15:43:34 +01:00
Scott Bishel
e07e114def don't clear AuthService/AuthData if user is System Admin (#12986) 2019-11-07 12:12:37 -07:00
Nikhil Ranjan
540cfb0239 Migrate tests from store/storetest/team_store.go to use testify (#12877)
* Migrate tests from store/storetest/team_store.go to use testify

* fix test

* fix varible declaration

* fix tests

* casting int64 to int for Equal check

* fix int64 int Equal check

* changes as per review
2019-11-07 20:01:32 +05:30
Abhishek Mane
5646b12686 (fixed) Refactor app/status.go to use structured logging #12723 (#12754) 2019-11-07 13:02:41 +01:00
Abu Hanifa
d37a58fe3a convert t.fatal into require (#12899) 2019-11-07 13:01:54 +01:00
Jesse Hallam
d99cf0864e MM-19477: update manifest documentation example (#13016)
Illustrate `homepage_url`, `support_url`, and `icon_path` in the GoDoc for model.Manifest.

Relates-to: https://mattermost.atlassian.net/browse/MM-19477
2019-11-06 18:22:18 -05:00
Lev
a7c1514d8e Bumped Zoom plugin to v1.1.2 (#13008)
* Bumped Zoom plugin version to 1.1.0

* Bumped Zoom plugin version to 1.1.1

* Bumped Zoom plugin to v1.1.2
2019-11-06 13:25:52 -08:00
Nikhil Ranjan
ad1ab6b038 Migrate tests from "store/storetest/webhook_store.go" to use testify (#12736)
* change t.Fatal calls to use testify require

* fix already defined err

* changes as per review comments

* changes as per review

* err is not nil
2019-11-06 21:40:50 +01:00
Akshay Chhajed
5b89cdcb6b GH-12888 Modify api4/config_test.go to use testify (#12946) 2019-11-06 20:51:30 +01:00
Jesse Hallam
6a906e91ad enable non-GOPATH testing with different mattermost-server folder name (#12930)
* enable non-GOPATH testing

Tweak the testlib package to support finding the root without assuming the folder name of the repository.

Fixes: MM-19729

* fix web tests
2019-11-06 14:46:51 -05:00
Rajat Varyani
14b1777959 [MM-19153] Add server version check in helper methods for plugins (#12675) 2019-11-06 17:42:46 +01:00
Rodrigo Villablanca Vásquez
a39f4f1064 Change the minor version of go to 1.13 (#13015)
* Changed go minor version 12 -> 13

* REQUIREDGOVERSION set to 1.13.0
2019-11-06 07:04:50 -08:00
Jesús Espino
8febdcf2b8 Removing unnecesary unnused old layered store (#12999) 2019-11-06 12:43:41 +01:00
Shobhit Gupta
a85c653f87 Migrate tests from "store/storetest/emoji_store.go" to use tes… (#12913) 2019-11-06 12:37:35 +01:00
scott lee davis
516017d3c9 MM-18068 Route integration actions to plugins without hitting the network (#12156)
* wip

* plugin Action requests doesn’t make external request

* import formatting fix

* changes requested in review by @lieut-data

* wip

* wip pointer

* added review changes requested by @lieut-data

* condense relative plugin url tests

* changes based on review by @crspeller

* gofmt
2019-11-06 05:39:59 -05:00
Clément Collin
5f91c14576 [MM-18676] Add tag annotations to plugin server API methods (#12701)
* [MM-18676] Add tag annotations to plugin server API methods

- With mattermost-developer-documentation/pull/383, it will allow to group methods by tag in documentation index

* Refine tag annotations in plugin API documentation

- Replace "Profile" by "User"
- Add additional tags to multi purpose methods
- Add "Group" tag
- Add tags to new methods
2019-11-06 07:49:28 +01:00
Christopher Speller
428454cee4 Adding interplugin communication. (#12829)
* Adding interplugin communication.

* Naming changes and moving ResponseTransfer to own file.

* Fix.

* Tests and moving to buffering bytes.

* Switching API to passing plugin ID through path rather than a header.

* Review feedback.
2019-11-04 17:35:58 -08:00
Daniel Schalla
501da809f3 [CR-458] Enhance Logs Endpoint Message (#12984)
* Make it possible to identify log entries created via the post API endpoints

* Clarify wording
2019-11-04 10:03:59 -08:00
Rajat Varyani
ac8e3a853c Add gorilla/handlers dependency as it is used in enterprise version (#12991)
* Add gorilla/handlers dependency as it is used in enterprise version

* Remove unused dependencies
2019-11-04 09:48:25 -08:00
Nicolas Le Cam
2ea0c669f6 Update minimum Safari supported version to 12 (#12912) 2019-11-04 11:01:29 -05:00
Witold Konior
159dec03a6 [MM-19355] Migrate tests from "store/storetest/user_store.go" (#12732)
* [MM-19355] Migrate tests from "store/storetest/user_store.go" to use testify

* fix error message

* make shadow happy!

* fix type casting in equal

* use assert instead of require to soft fail for email updates
2019-11-04 08:50:17 -05:00
Gervasio Marchand
1db045bce3 MM-16822 - Implement KVSetWithOptions (#11818)
* Add SetWithOptions

* Avoid passing two structs to the functions

* Rename ExpiryInSeconds -> ExpireInSeconds

* Use t.Run for the tests

* Fix build

* Address feedback

* Update log message

* Update docs and use KVSetWithOptions in KVCompareAndSetJSON

* Improve code style

* Use struct instead of pointer to struct

* Fix minimum server versions

* Update documentation

* Address feedback

* Revert new implemention of kv helpers

* Adress feedback
2019-11-04 13:49:54 +01:00
Ben Schumacher
812c40a307 Adjust govet settings and fix issues found by it (#12947) 2019-11-04 13:47:59 +01:00
Amy Blais
3a1deeaac5 Update en.json (#12684) 2019-11-04 13:47:23 +01:00
Adarsh K Kumar
cacdda702e MM-19663 | Migrate brand_test and cluster_test to testify (#12935)
* MM-19663 | Migrate brand_test and cluster_test to testify

* Use require.Fail instead of require.FailNow

Co-Authored-By: Ben Schumacher <ben.schumacher@mattermost.com>
2019-11-03 17:13:22 +02:00
Ben Schumacher
a2adf7b3f5 Run unused against codebase (#12968)
* Remove unused methods

* Fix missed issues
2019-11-01 23:08:01 +01:00
Joshua Bezaleel Abednego
63a28700f5 [MM-12623] Create CLI command "config reset" (#10296) 2019-11-01 19:29:02 +01:00
Nikhil Ranjan
3687a0b6c1 Migrate tests from store/storetest/status_store.go to use test… (#12873) 2019-11-01 12:52:18 +01:00
Ben Schumacher
0b24c336b3 Fix golangci-lint target (#12985) 2019-10-31 15:53:40 -05:00
Christopher Poile
0697f5206c [MM-16437] Plugin crashes the server when calling WriteHeader with an invalid http code (#11276)
* [MM-16437] add a check so that we don't write an invalid header

* better solution

* * passing in the logger; logging the error; fixed a spelling mistake

* trigger jenkins
2019-10-31 13:27:49 -04:00
catalintomai
7c658a98f0 MM-18060: Include deleted posts in compliance export. (#12957) 2019-10-31 09:31:18 -07:00
jfrerich
f3716caba9 [MM-18331] When patching a bot send websocket notification (#12373)
* When patching a bot, perform these two additional steps:

1. Update the user.UpdateAt value for the user/bot.

2. send the websocket event so all clients know a user update has
occured. This will tell clients to update the displayname

* Add check for UpdateAt.  Check that createdBot.UpdateAt is not equal
to patchedBot.UpdateAt

* re-add unintentional empty line delete in previous commit

* Don't create a fake updateAt time.  Let the Update() method handle the
change. User the returned updateUser for sending updated user event
2019-10-31 11:25:19 -05:00
Claudio Costa
422f377c96 [MM-19473] Fix data race on user login (#12870)
* Avoid writes to App.Session outside the app layer

* Fix merge

* Remove unneeded else condition
2019-10-31 12:50:43 +01:00
Luke Kingland
6f6eb13a47 license, openGraph tests: convert to testify (#12919) 2019-10-31 12:19:19 +01:00
Luke Kingland
8c3dcadbd7 oauth_test: use testify (#12949)
* oauth_test: use testify

* oauth_test: use assert in most cases, correct param order
2019-10-31 10:47:51 +01:00
Shota Gvinepadze
b208bbc43e [MM-18830] Unhelpful error message when adding bot to a channel before adding to team (#12844)
* Fix error message

* Rename User to Username

* Add '@' to the username
2019-10-31 12:49:50 +04:00
Luke Kingland
df0bb8aaa0 emoji_test: update to use testify (#12932)
* emoji_test: update to use testify

* emoji_test: use testify builtin Len check, and add missing err check
2019-10-31 12:44:27 +04:00
Ali Farooq
e4ed763e2a MM-19310 - Wrong validation message when Bot name ends in a . (#12905)
* MM-19310 - Wrong validation message when Bot name ends in a .

* Reverting back old behaviour
2019-10-30 17:00:43 -04:00
Nikhil Ranjan
a221c52acb Migrate tests from store/storetest/oauth_store.go to use testify (#12875) 2019-10-30 19:37:36 +01:00
Romain FOYARD
4111ffdb4d Include extra metadata when clicking an interactive button (#12697)
* Include user_name, team_domain and channel_name when clicking an interactive button

* Fixed api4's TestPostActionCookies test

* Moved team database request to improve concurrency.
Renamed TeamDomain to TeamName.

* Further optimizations to database requests

* Removed useless goroutine when fetching channel
2019-10-30 10:36:14 -07:00
George Goldberg
1b95ee9834 MM-19553: Generate valid passwords on bulk import. (#12871)
This changes the bulk import so when it needs to generate a password
because no password or auth data was supplied, it now takes into account
the configured minimum length, as well as assuming all other distinct
character types are configured to be required. It should now generate
valid passwords regardless of the password policy configuration in the
Mattermost configuration file.
2019-10-30 16:57:51 +00:00
Luciano Magro Mores
f9a7a16a78 Convert api4/webhook_test.go t.Fatal calls into require/assert calls (#12904) 2019-10-30 21:08:40 +08:00
Ben Schumacher
bc2b8b85fb Fix golangci-lint target for non GOPATH installations (#12934)
* Fix golangci-lint target for non GOPATH installations

* Link to https://github.com/golangci/golangci-lint#install
2019-10-30 12:48:51 +01:00
Paulo Bittencourt
7d0d7c304e MM-17888 Check plugin Helpers minimum server version comments (#12663) 2019-10-30 08:34:29 +01:00
Clément Collin
7cc1f19453 [MM-18898] Stringify plugin.Log* parameters (#12700)
- Add stringutils with method that "stringify" object slices
  - "stringify" means convert each object to its string representation
- Move plugin.Log* implementations to client_rpc, use stringify method before calling server method
- Exclude Log* methods from generated RPC methods
- No signature change for plugin.Log* API
- Add test in plugin_api_test to use plugin.Log* methods with RPC
2019-10-30 04:17:04 +01:00
catalintomai
5dbccd0f07 [MM-18360] Add audit logging for SAML user login (#12831)
* Add audit logging for SAML user login

* add statement for login sucess

* Update web/saml.go

Co-Authored-By: Martin Kraft <martin@upspin.org>
2019-10-29 10:54:43 -07:00
Alexander Morozov
9b9923ea42 Replace time.After with time.NewTimer (#12945)
time.After might leave stray timers if other channels in select triggered early

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2019-10-29 18:41:54 +01:00