Commit graph

22 commits

Author SHA1 Message Date
Carrie Warner (Mattermost)
dcd66d2146
MM-41988 Updated links to legacy domain about.mm.com (#19552)
* Updated links to legacy domain about.mm.com

* Legacy link updates

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* about.mm.com URL updates

* mattermost.org URL updates

* forum.mm.org URL update

* Update .github/ISSUE_TEMPLATE.md

* Update .github/ISSUE_TEMPLATE.md

* Un-deleted language files

* Update README.md

* Update tests/test-config.json

* fix some test due to url updating (#19787)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2022-03-16 19:47:57 +08:00
Agniva De Sarker
939551ed10
MM-38634: Simplify image proxy (#19603)
We copy over the necessary code to simplify
the local image proxy feature.

https://mattermost.atlassian.net/browse/MM-38634

```release-note
NONE
```
2022-02-24 09:02:57 +05:30
Doug Lauder
a4507327a7
MM-36764 mlog refactor (#18118)
Refactor mlog
- simplify mlog by removing redundant code
- remove Zap dependency
- update unit test helpers
- update logging config
- update auditing
2021-08-17 16:08:04 -04:00
Agniva De Sarker
c4b4e1bc38
MM-36271: Bump major version to 6.0 (#17973)
https://mattermost.atlassian.net/browse/MM-36271

```release-note
We bump the major version to 6.0
```
2021-07-22 12:21:47 +05:30
Ben Schumacher
97ccf0bdf6 [MM-16751] golint model (#17896) 2021-07-21 16:38:39 +02:00
Haardik Dharma
343c51830f
Fix initialism errors (PR-2) (#17032)
* Fix initialism errors

* Fix check-mocks test

* Revert mlog and filestore packages

* Update plugin_hooks_test.go

* Update opentracinglayer.go

* Regenerate mocks and check store layers

* Revert plugin's context changes

* Update context.go

* Update plugin_requests.go

* Update plugin_hooks_test.go

* Regenerate mocks

* Regenerate mocks and store layers

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-03 12:43:22 +05:30
Jesús Espino
9cc5089af8
Moving mlog to corelibs (#16915)
* Moving mlog to corelibs

* Regenerating app layers

* Fix golangci-lint problem

* Fixing golangci-lint errors

* Renaming from corelibs to shared

* Renaming from corelibs to shared

* Fixing import

* Fixing merge problems

* Fixing build
2021-03-05 09:18:37 +01:00
Jesús Espino
5f043b0a08
Changed require.Nil to require.NoError when error type is used (#16900) 2021-02-10 09:30:36 +01:00
Agniva De Sarker
e89b26e8f3
goimports (#16640)
* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w`

* added goimports lint check to .golangci.yml

* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w` for a corner case

* make app-layers, *-mocks and store-layers for ci check

Co-authored-by: Mahmudul Haque <mahmudulhaque@protonmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-07 22:42:43 +05:30
Ibrahim Serdar Acikgoz
f9c0c1072f
[MM-31360] downgrade error logs which doesn't break the flow (#16612)
* downgrade error logs which doesn't break the flow

* reflect revivew comments
2021-01-04 17:02:34 +03:00
Agniva De Sarker
0ca8cb36b4
MM-26425: Make URL parsing for image proxy more robust (#16197)
* MM-26425: Make URL parsing for image proxy more robust

- We don't bypass protocol relative URLs.
- We don't bypass hostnames with a similar prefix.

https: //mattermost.atlassian.net/browse/MM-26425

```release-note
NONE
```

* fix tests and incorporate review comments

* Handle opaque URLs

* Fix path tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-10 13:06:59 +05:30
Agniva De Sarker
5cb16c9fc7
MM-24395: Set response header to be attachment for SVG images. (#14385)
* MM-24395: Set response header to be attachment for SVG images.

We check the file extension and appropriately set the response header.
SVG images without a file extension aren't proxied at all. So there's no
problem with that.

* Add test

* Improve test a bit

* Capture content type

* incorporate comments

* Set attachment mode in case of error too
2020-04-30 09:03:13 +05:30
Miguel de la Cruz
bfde6d1f3e
Removing unnecesary main_test.go files (#13979) 2020-03-05 14:46:52 +01:00
Jesús Espino
a63684fcb5
Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +01:00
Miguel de la Cruz
2259b7f2a8
[MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Ben Schumacher
8a72ed2833
Fix unnecessary type conversions (#12927) 2019-10-28 10:57:21 +01:00
Harrison Healey
dce6cb601f
MM-14686 Send all image proxy requests through /api/v4/image (#10775)
* MM-14686 Implement /api/v4/image when proxy is disabled

* MM-14686 Send all image proxy requests through /api/v4/image

* Update unit tests
2019-05-06 09:22:37 -04:00
Harrison Healey
cbcfef25e5
MM-14574 Intercept log messages from local image proxy (#10668)
* MM-14574 Switch willnorris/imageproxy to fork

* MM-14574 Intercept log messages from local image proxy

* Revert "MM-14574 Switch willnorris/imageproxy to fork"

This reverts commit 046ab5c421.

* Update willnorris/imageproxy
2019-04-24 11:55:37 -04:00
Sandeep Sukhani
29060acb45 [MM-13828] Initialize tests in each package with a new temp folder with all test resources (#10261)
* [MM-13828] Running tests from a new temp folder with all test resources

Possible fix for #10132

All packages which have a TestMain and use testlib.MainHelper will have a new current working directory which will have all the test
resources copied.

Note: default.json is copied as config.json as well to make sure tests don't have any impact due to changes in config by devs

* [MM-13828] Added TestMain to remaining packages to use testlib.MainHelper

This makes sure tests from all packages run with same test resources, setup in a new temp folder for each package

* Updated Jenkins file to not not config/default.json

This makes sure CI has same config files as a dev's machine

* [MM-13828] Changes requested from code review

Added accessor methods to testlib.MainHelper for accessing members
Fixed some broken tests due to change in cwd while tests run
Some other code refactoring and improvements

* [MM-13828] Added new factory method with options for creating test main helper and some code refactoring

testlib.NewMainHelperWithOptions supports options to turn on/off test dependencies and environment setup
Some other code refactoring

* Exporting members of testlib.MainHelper to make enterprise tests work

* Fixed gofmt error

* [MM-13828] removed unwanted dependency on plugins directory while setting up test resources

* [MM-13828] Fixed some tests failing due to them being running from temp folder

* [MM-13828] Some code changes suggested in PR review

* Fixed gofmt error
2019-02-19 09:20:11 -05:00
Harrison Healey
87e36a3ecf
MM-14146 Update CSP for local image proxy (#10277) 2019-02-12 15:27:17 -05: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
Harrison Healey
ba5566d1a0
MM-10417 Add local image proxy and enable by default (#9967)
* MM-10417 Add local image proxy and enable by default

* Remove unused function

* Add dependencies for willnorris/imageproxy

* Fixed compilation errors

* Lock to the master version of willnorris/imageproxy

* Fix atmos/camo proxy when no SiteURL is specified

* Re-add default values for deprecated settings

* Fix unit tests added by merge

* Pass imageproxy to App struct

* Remove unneeded locking when creating the image proxy

* Remove empty test file
2019-01-24 16:11:32 -04:00