[PR #224] [MERGED] Handle ssh key import better #15233

Closed
opened 2025-11-02 11:41:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/224
Author: @stroucki
Created: 11/23/2016
Status: Merged
Merged: 11/24/2016
Merged by: @lunny

Base: masterHead: 20161017sshkeys


📝 Commits (2)

  • 087508b Handle user ssh key input better
  • 757fb4d ssh_key: correct indentation

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 models/ssh_key.go (+2 -0)

📄 Description

(copied from original)
ssh_key: when user submitted keys had a newline at the end, strings.Split
would have created a slice with an empty last element, and the key type
check would be incorrect. Perhaps a better way is to look for 'ssh-rsa' or
'ssh-dsa' at the beginning of the string, but this is simple.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/224 **Author:** [@stroucki](https://github.com/stroucki) **Created:** 11/23/2016 **Status:** ✅ Merged **Merged:** 11/24/2016 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `20161017sshkeys` --- ### 📝 Commits (2) - [`087508b`](https://github.com/go-gitea/gitea/commit/087508bdc25779e0d596a395b04afed7f582c820) Handle user ssh key input better - [`757fb4d`](https://github.com/go-gitea/gitea/commit/757fb4d8d9557ccaecb87ad16e7bd5846edd59fd) ssh_key: correct indentation ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `models/ssh_key.go` (+2 -0) </details> ### 📄 Description (copied from original) ssh_key: when user submitted keys had a newline at the end, strings.Split would have created a slice with an empty last element, and the key type check would be incorrect. Perhaps a better way is to look for 'ssh-rsa' or 'ssh-dsa' at the beginning of the string, but this is simple. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:41:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15233