summaryrefslogtreecommitdiffstats
path: root/api/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/channel.go')
-rw-r--r--api/channel.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/channel.go b/api/channel.go
index e0428f311..c4a5eae96 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -784,6 +784,11 @@ func getChannel(c *Context, w http.ResponseWriter, r *http.Request) {
member := cmresult.Data.(model.ChannelMember)
data.Member = &member
+ if data.Channel.TeamId != c.TeamId {
+ c.Err = model.NewLocAppError("getChannel", "api.channel.get_channel.wrong_team.app_error", map[string]interface{}{"ChannelId": id, "TeamId": c.TeamId}, "")
+ return
+ }
+
if HandleEtag(data.Etag(), w, r) {
return
} else {