CSRF Token Implementation for Plugins (#9192)
deleted test config fix test config Dont wipe the session token for plugins Simplified Tokens; Generate CSRF for other sessions Remove CSRF from Access Token; Remove Getter/Setter from Context fix removed setter remove getcsrf helper from plugin api enforce csrf only for cookie auth
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
90e84d76ef
Коммит
2936dc87d0
@@ -65,6 +65,16 @@ func (api *PluginAPI) UnregisterCommand(teamId, trigger string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetSession(sessionId string) (*model.Session, *model.AppError) {
|
||||
session, err := api.app.GetSessionById(sessionId)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return session, nil
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetConfig() *model.Config {
|
||||
return api.app.GetConfig()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user