q3k
10 hours ago
diff --git a/server/channels/app/limits.go b/server/channels/app/limits.go
index b13103898a..a8be8dd908 100644
--- a/server/channels/app/limits.go
+++ b/server/channels/app/limits.go
@@ -36,17 +36,6 @@ func (a *App) GetServerLimits() (*model.ServerLimits, *model.AppError) {
limits.MaxUsersHardLimit = licenseUserLimit + int64(extraUsers)
}
- // Check if license has post history limits and get the calculated timestamp
- if license != nil && license.Limits != nil && license.Limits.PostHistory > 0 {
- limits.PostHistoryLimit = license.Limits.PostHistory
- // Get the calculated timestamp of the last accessible post
- lastAccessibleTime, appErr := a.GetLastAccessiblePostTime()
- if appErr != nil {
- return nil, appErr
- }
- limits.LastAccessiblePostTime = lastAccessibleTime
- }
-
activeUserCount, appErr := a.Srv().Store().User().Count(model.UserCountOptions{})
if appErr != nil {
return nil, model.NewAppError("GetServerLimits", "app.limits.get_app_limits.user_count.store_error", nil, "", http.StatusInternalServerError).Wrap(appErr)donohoe
7 hours ago
Or just this:
$ sed -i -E '/maxUsers(Hard)?Limit.*0$/s/$/_000/' channels/app/limits.go
Source: https://github.com/mattermost/mattermost/issues/34271#issuec...compsciphd
7 hours ago
could be more complicated than this. the easiest thing (to me) would be to midufy the License() function so that it sets the Limits "correctly", as these type of things can be in multiple places.
kmeisthax
2 hours ago
I was wondering if this was even legal[0], so I went to the repo and noticed that their licensing[1] seems to be... a mess?
It says you can use "compiled versions" under the MIT License. Then it says you can use the source code under AGPL 3.0. And then it additionally says that they won't enforce the AGPL 3.0 copyleft if you haven't modified the source and don't link the Mattermost Platform directly. This is at best a bunch of tautologies that render the Affero clause moot and at worst enable a really stupid workaround to copyleft.
First off, the Affero clause - number 13 - in the AGPL only applies if you modify the source. There is no legal requirement to convey source code on a network server otherwise. So this is downgrading the license to GPL with extra steps.
Second, "linking directly" isn't legally meaningful with regards to the GPL. GPL cares about whether or not your derivative work forms a single "program" - which is deliberately left ambiguous, but almost certainly does not refer to the concept of an address space alone, or even a Go import. I guess what they wanted was to treat the Mattermost Admin and Configuration files under terms that are sort of LGPL-like? But that portion of the binary is already dual-licensed Apache 2.0. So there's no reason to argue
Third, and more importantly... the compiled versions license basically renders the source code requirement of the GPL family null and void. Like, in a normal use of the GPL, if you distribute binaries you're required to offer source. But here, they've weakened that clause.
The most speculative argument I have is that one could disassemble a compiled Go binary to obtain a "compiled version" under MIT terms that is no longer subject to any copyleft whatsoever. This is obviously contrary to the intent of the license, so I'm not sure if a judge would bother listening to this argument, but it's still really bad drafting. I suspect this license document was written by a business strategy guy, not a lawyer.
[0] If this code actually expressed their license requirements, then posting this Git diff is a violation of DMCA 1201, and you'd be liable for jail time. Er, well, except GPL version 3 (only) has a specific anti-1201 clause. But who knows if that's even applicable given the five different licenses at play?
[1] https://github.com/mattermost/mattermost/blob/master/LICENSE...