Skip to content

Commit

Permalink
Limit channel name size (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: Mattermost Build <[email protected]>
  • Loading branch information
larkox and mattermost-build authored Aug 26, 2024
1 parent 9a50bf2 commit 7351c50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ func (s *Server) handleSendNotification(w http.ResponseWriter, r *http.Request)
msg.Message = msg.Message[0:2046]
}

if len(msg.ChannelName) > 64 {
msg.ChannelName = msg.ChannelName[0:64]
}

// Parse the app version if available
index := strings.Index(msg.Platform, "-v")
platform := msg.Platform
Expand Down

0 comments on commit 7351c50

Please sign in to comment.