mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-07 23:55:35 +00:00
fix: return empty slice if AttributeSSHPublicKey is missing in RawData
This commit is contained in:
parent
4f92b738b5
commit
666654a5ef
1 changed files with 1 additions and 1 deletions
|
@ -1188,7 +1188,7 @@ func getSSHKeys(source *oauth2.Source, gothUser *goth.User) ([]string, error) {
|
|||
key := source.AttributeSSHPublicKey
|
||||
value, exists := gothUser.RawData[key]
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("attribute '%s' not found in user data", key)
|
||||
return []string{}, nil
|
||||
}
|
||||
|
||||
rawSlice, ok := value.([]any)
|
||||
|
|
Loading…
Reference in a new issue