summaryrefslogtreecommitdiffstats
path: root/model/access.go
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2017-04-03 14:37:58 -0300
committerCorey Hulen <corey@hulen.com>2017-04-03 10:37:58 -0700
commit1cbe6e797517089140ee2db12d73c0781f5e3e6b (patch)
tree5671819dcbfdc6f359410e3558135090d3724e4c /model/access.go
parent68bb5a2ec85a6d34726a137bad65157d0ff65247 (diff)
downloadchat-1cbe6e797517089140ee2db12d73c0781f5e3e6b.tar.gz
chat-1cbe6e797517089140ee2db12d73c0781f5e3e6b.tar.bz2
chat-1cbe6e797517089140ee2db12d73c0781f5e3e6b.zip
Add more OAuth unit tests (#5946)
Diffstat (limited to 'model/access.go')
-rw-r--r--model/access.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/model/access.go b/model/access.go
index 85417fce9..520417f4e 100644
--- a/model/access.go
+++ b/model/access.go
@@ -51,7 +51,7 @@ func (ad *AccessData) IsValid() *AppError {
return NewLocAppError("AccessData.IsValid", "model.access.is_valid.refresh_token.app_error", nil, "")
}
- if len(ad.RedirectUri) > 256 {
+ if len(ad.RedirectUri) == 0 || len(ad.RedirectUri) > 256 || !IsValidHttpUrl(ad.RedirectUri) {
return NewLocAppError("AccessData.IsValid", "model.access.is_valid.redirect_uri.app_error", nil, "")
}