From ee5150dc6e01cab7b4cb221fd2cb870e100f5a47 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 13 Sep 2017 06:27:46 +0530 Subject: [PATCH] strip instead of trim --- hosting/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/forms.py b/hosting/forms.py index f572b693..dae911e4 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -94,7 +94,7 @@ class UserHostingKeyForm(forms.ModelForm): if 'generate' in self.request.POST: return self.data.get('public_key') KEY_ERROR_MESSAGE = _("Please input a proper SSH key") - openssh_pubkey_str = self.data.get('public_key').trim() + openssh_pubkey_str = self.data.get('public_key').strip() with tempfile.NamedTemporaryFile(delete=True) as tmp_public_key_file: tmp_public_key_file.write(openssh_pubkey_str.encode('utf-8'))