Commit graph

16 commits

Author SHA1 Message Date
Catena cyber
758bdd785f
perf: apply perfpsrint linter (#33967)
* perf: apply perfpsrint linter

* further simplifications

* improved TestParseHashtags coverage

* more simplifications

* simplify renderBlockHTML further

---------

Co-authored-by: Jesse Hallam <jesse@mattermost.com>
2025-11-28 11:23:51 -04:00
Agniva De Sarker
41e88b74ac
MM-61407: Remove Bleve (#33430)
https://mattermost.atlassian.net/browse/MM-61407

```release-note
NONE
```

* webapp i18n

```release-note
NONE
```

* Fix e2e tests

```release-note
NONE
```

* fix roles in e2e tests

```release-note
NONE
```

* some review comments

```release-note
NONE
```

* add back permissions to deprecated list

```release-note
NONE
```
2025-07-31 09:35:29 +05:30
Ben Schumacher
9add320011
[MM-64654] Migrate to modern Go features (#31820) 2025-07-18 12:54:51 +02:00
Agniva De Sarker
f9a4d04c64
MM-63652: Transition gossip encryption functionality to GA (#33349)
* MM-63652: Transition gossip encryption functionality to GA

Create a new config setting, and migrate the old values to new.

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

Skip-Enterprise-PR: true

```release-note
NONE
```

* fix i18n

also fix unit tests

```release-note
NONE
```

* For fresh installations, default to true

```release-note
NONE
```

* gofmt files

```release-note
NONE
```

* Fixing some more strings

```release-note
NONE
```

* Update e2e tests

```release-note
NONE
```
2025-07-14 19:23:12 +05:30
Alejandro García Montoro
de46d798e4
MM-60780: Reject emails within angle brackets (#29661)
* Reject emails within angle brackets

mail.ParseAddress is RFC-compliant, which means that it accepts emails
with names, as in "Billy Bob <billy@example.com>". It even accepts this
form *without* a name; e.g. "<billy@example.com>". We want to store the
plain address, so we compare the user input with the Address field of
the result from mail.ParseAddress, which should contain only
"billy@example.com", thus only accepting emails that do not contain
names nor angle brackets.

* Log a warning for admins with clear next steps

* Fix wording of comment

* And a typo

* Add specific command example to log message

* Add input email to log message

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-04-21 19:22:15 +02:00
Scott Bishel
d5ce06e580
MM-60722 - don't allow multiple '@' in email (#28481)
* don't allow quoted strings in email

* don't allow multiple '@' in email

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-10-15 12:21:02 -06:00
Ben Schumacher
d9e47522a0
Remove unnecessary copies of loop variables (#28138) 2024-09-11 16:51:30 +02:00
Christopher Poile
6ea363e260
[MM-57070] Remove detailed_error from errors when not in dev mode (#26414)
* remove detailed error from appErr.ToJSON

* Revert "remove detailed error from appErr.ToJSON"

This reverts commit 3c2fa7352d.

* use WipeDetailed instead of err.DetailedError = ""

* fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-03-20 13:30:14 -04:00
Harshil Sharma
521844fed5
API handler opts modifier (#26148)
* POC for API handler opts modifier

* Made upload POSt api a  file upload API

* Specified file upload local API

* Specified file upload local API

* Specified file upload API

* Simplified handler params

* Added basic security checks

* Fixed i18n

* used type for API handler options

* Removed limited reader from util deserializers (#26263)
2024-02-21 12:13:50 +00:00
Ben Schumacher
7e317c7568
[MM-56455] Handle HTTP error for too large request body in Client4 (#25842) 2024-02-09 17:15:03 +01:00
Harshil Sharma
62064e3bf7
Used limited reader in user invite (#25943)
* Used limited reader in user invite

* Added tests
2024-01-23 11:11:10 +05:30
Scott Bishel
82b8d4dc07
MM-55966 - Update ArrayFromJSON to use LimitedReader (#25510)
* update ArrayFromJSON to use LimitedReader

* update for bad merge

* fix lint errors

* update test code

* update unit tests

* update unit tests

* fix unit tests

* use consts, other cleanup

* add non sorting duplicate check

* set config to default value, then config setting if available

* fix lint errors

* fixes and debugs

* fix log test

* remove setting from Client, add unlimited Parser to client

* a couple more fixes

* another fix

* rename some variables

* remove superflous call

* check for valid MaximumPayloadSize

* update language file

* fix for e2e-tests

* update util function to return error

* lint fix

* update config property name to include unit

* fix for unit test

* add new config to telemetry

* call function to create LimitedReader

* Deprecate old function, use new function name

* return new AppError on failed parse

* return new AppError on failed parse

* return new AppError on failed parse

* add constant for i18n valid constants

* Update server/public/model/utils_test.go

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* Apply suggestions from code review

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* update error variable, remove unnecessary check

* Update function names

* fix errors from merge

* update unit test to create unique ids

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>
2024-01-09 10:04:16 -07:00
Ben Schumacher
5b6b425cfc
[MM-56061] Only render where field in model.AppError when it's present (#25648)
* Only render where field in model.AppError when it's present

* Remove trailing comma from permission error
2023-12-11 10:27:51 +01:00
Ben Schumacher
0d5a8b8841
Add whitespace linter (#24855) 2023-10-11 10:13:36 +02:00
Agniva De Sarker
d9a28c1244
MM-52532: Fix golangci warnings for public module (#23918)
https://mattermost.atlassian.net/browse/MM-52532

```release-note
NONE
```
2023-06-30 20:12:56 +05:30
Jesse Hallam
bb02b35048
Expose public/ API as submodule (#23345)
* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
2023-05-10 13:07:02 -03:00
Renamed from server/model/utils_test.go (Browse further)