Automatic Merge
Этот коммит содержится в:
Mattermost Build
2025-09-01 16:34:06 +03:00
коммит произвёл GitHub
родитель ef896a4ea6
Коммит 27fadafead
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@@ -6,6 +6,7 @@ package app
import (
"bytes"
"context"
"crypto/subtle"
b64 "encoding/base64"
"encoding/json"
"fmt"
@@ -279,7 +280,7 @@ func (a *App) GetOAuthAccessTokenForCodeFlow(c request.CTX, clientId, grantType,
return nil, model.NewAppError("GetOAuthAccessToken", "api.oauth.get_access_token.credentials.app_error", nil, "", http.StatusNotFound).Wrap(nErr)
}
if oauthApp.ClientSecret != secret {
if subtle.ConstantTimeCompare([]byte(oauthApp.ClientSecret), []byte(secret)) == 0 {
return nil, model.NewAppError("GetOAuthAccessToken", "api.oauth.get_access_token.credentials.app_error", nil, "", http.StatusForbidden)
}