Merge pull request #455 from nickago/MM-1604
MM-1604 Changed 1 hour expire time to 30 days
Этот коммит содержится в:
13
web/web.go
13
web/web.go
@@ -4,18 +4,19 @@
|
|||||||
package web
|
package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
l4g "code.google.com/p/log4go"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html/template"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
l4g "code.google.com/p/log4go"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/mattermost/platform/api"
|
"github.com/mattermost/platform/api"
|
||||||
"github.com/mattermost/platform/model"
|
"github.com/mattermost/platform/model"
|
||||||
"github.com/mattermost/platform/utils"
|
"github.com/mattermost/platform/utils"
|
||||||
"github.com/mssola/user_agent"
|
"github.com/mssola/user_agent"
|
||||||
"gopkg.in/fsnotify.v1"
|
"gopkg.in/fsnotify.v1"
|
||||||
"html/template"
|
|
||||||
"net/http"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var Templates *template.Template
|
var Templates *template.Template
|
||||||
@@ -214,7 +215,7 @@ func signupTeamComplete(c *api.Context, w http.ResponseWriter, r *http.Request)
|
|||||||
props := model.MapFromJson(strings.NewReader(data))
|
props := model.MapFromJson(strings.NewReader(data))
|
||||||
|
|
||||||
t, err := strconv.ParseInt(props["time"], 10, 64)
|
t, err := strconv.ParseInt(props["time"], 10, 64)
|
||||||
if err != nil || model.GetMillis()-t > 1000*60*60 { // one hour
|
if err != nil || model.GetMillis()-t > 1000*60*60*24*30 { // 30 days
|
||||||
c.Err = model.NewAppError("signupTeamComplete", "The signup link has expired", "")
|
c.Err = model.NewAppError("signupTeamComplete", "The signup link has expired", "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user