@@ -157,18 +157,18 @@ func (a *App) servePluginRequest(w http.ResponseWriter, r *http.Request, handler
|
||||
if r.Header.Get(model.HEADER_REQUESTED_WITH) == model.HEADER_REQUESTED_WITH_XML && !csrfCheckPassed {
|
||||
csrfErrorMessage := "CSRF Check failed for request - Please migrate your plugin to either send a CSRF Header or Form Field, XMLHttpRequest is deprecated"
|
||||
sid := ""
|
||||
userId := ""
|
||||
userID := ""
|
||||
|
||||
if session != nil {
|
||||
sid = session.Id
|
||||
userId = session.UserId
|
||||
userID = session.UserId
|
||||
}
|
||||
|
||||
fields := []mlog.Field{
|
||||
mlog.String("path", r.URL.Path),
|
||||
mlog.String("ip", r.RemoteAddr),
|
||||
mlog.String("session_id", sid),
|
||||
mlog.String("user_id", userId),
|
||||
mlog.String("user_id", userID),
|
||||
}
|
||||
|
||||
if *a.Config().ServiceSettings.ExperimentalStrictCSRFEnforcement {
|
||||
|
||||
Ссылка в новой задаче
Block a user