summaryrefslogtreecommitdiffstats
path: root/api/channel.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-06-15 08:00:55 -0400
committerGitHub <noreply@github.com>2016-06-15 08:00:55 -0400
commit1cfb35fd32478917ddf8becb7e438280db19d66a (patch)
treeb5f0e3157201767f2fd7df87be73617034f35a42 /api/channel.go
parentf6b4a611d0ef28d5f08959a51c31ad480df1883a (diff)
downloadchat-1cfb35fd32478917ddf8becb7e438280db19d66a.tar.gz
chat-1cfb35fd32478917ddf8becb7e438280db19d66a.tar.bz2
chat-1cfb35fd32478917ddf8becb7e438280db19d66a.zip
Fix channels showing up across teams when multiple teams open in same browser (#3329)
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 {