<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<div class="moz-cite-prefix">Thanks for reporting ... and for the
patch.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">But do you agree that</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">--- a/kallithea/lib/ssh.py<br>
+++ b/kallithea/lib/ssh.py<br>
@@ -86,7 +86,7 @@ def parse_pub_key(ssh_key):<br>
except binascii.Error:<br>
raise SshKeyParseError(_("Incorrect SSH key - failed to
decode base64 part %r") % keyvalue)<br>
<br>
- if not decoded.startswith('\x00\x00\x00\x07' + str(keytype) +
'\x00'):<br>
+ if not decoded.startswith('\x00\x00\x00' + chr(len(keytype))
+ str(keytype) + '\x00'):<br>
raise SshKeyParseError(_("Incorrect SSH key - base64 part
is not %r as claimed but %r") % (str(keytype),
str(decoded[4:].split('\0', 1)[0])))<br>
<br>
return keytype, decoded, comment<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">would be correct and a bit simpler?</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">/Mads</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 12/1/19 12:40 AM, Adi Kriegisch
wrote:<br>
</div>
<blockquote type="cite" cite="mid:2419598.JbyILtJBDu@lotta">
<pre class="moz-quote-pre" wrap="">Dear all,
first off, thank you very much for ssh support! During testing I noticed that
ed25519 ssh keys were rejected with "Incorrect SSH key - base64 part is not
ed25519 as claimed but ed25519".
The reason for this is in the condition in lib/ssh.py that hard codes the
string length of the key type -- 7 or '\x07' -- which fits ssh-rsa and ssh-dss
but not ssh-ed25519. Find a patch attached that fixes the issue.
Thank you very much for your work on kallithea!
best regards,
Adi Kriegisch</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
kallithea-general mailing list
<a class="moz-txt-link-abbreviated" href="mailto:kallithea-general@sfconservancy.org">kallithea-general@sfconservancy.org</a>
<a class="moz-txt-link-freetext" href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>