Bump Go version to 1.23.6 (#30242)
* Bump Go version to 1.23.6 * Update CodeQL Github action as well * Use server's Go version for CodeQL action Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com> * Empty commit to trigger CI * Bump golangci-lint to a version supporting Go 1.23 * Fix golangci-lint warnings Several rules from gosimple, revive and staticcheck linters were failing: - Redefinition of built-in identifiers (max, min, new, recover...) - Use of printf-like functions with simple strings - Check for nil slices, when len already takes it into account --------- Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
77ae2e2d6d
Коммит
acbbd4c58d
@@ -232,19 +232,19 @@ func (a *App) BuildSamlMetadataObject(idpMetadata []byte) (*model.SamlMetadataRe
|
||||
data := &model.SamlMetadataResponse{}
|
||||
data.IdpDescriptorURL = entityDescriptor.EntityID
|
||||
|
||||
if entityDescriptor.IDPSSODescriptors == nil || len(entityDescriptor.IDPSSODescriptors) == 0 {
|
||||
if len(entityDescriptor.IDPSSODescriptors) == 0 {
|
||||
err := model.NewAppError("BuildSamlMetadataObject", "api.admin.saml.invalid_xml_missing_idpssodescriptors.app_error", nil, "", http.StatusInternalServerError)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
idpSSODescriptor := entityDescriptor.IDPSSODescriptors[0]
|
||||
if idpSSODescriptor.SingleSignOnServices == nil || len(idpSSODescriptor.SingleSignOnServices) == 0 {
|
||||
if len(idpSSODescriptor.SingleSignOnServices) == 0 {
|
||||
err := model.NewAppError("BuildSamlMetadataObject", "api.admin.saml.invalid_xml_missing_ssoservices.app_error", nil, "", http.StatusInternalServerError)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
data.IdpURL = idpSSODescriptor.SingleSignOnServices[0].Location
|
||||
if idpSSODescriptor.SSODescriptor.RoleDescriptor.KeyDescriptors == nil || len(idpSSODescriptor.SSODescriptor.RoleDescriptor.KeyDescriptors) == 0 {
|
||||
if len(idpSSODescriptor.SSODescriptor.RoleDescriptor.KeyDescriptors) == 0 {
|
||||
err := model.NewAppError("BuildSamlMetadataObject", "api.admin.saml.invalid_xml_missing_keydescriptor.app_error", nil, "", http.StatusInternalServerError)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user