[ 
https://issues.apache.org/jira/browse/SSHD-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17077479#comment-17077479
 ] 

Justin Crawford edited comment on SSHD-974 at 4/7/20, 6:09 PM:
---------------------------------------------------------------

Apologies for the delay. I did some debugging of the code. It looks like when 
it checks the code at `AuthorizedKeyEntry.java:241` it will call 
`parseAuthorizedKeyEntry` then the one which takes a resolver that is set to 
null.
 It seems to parse each segment of the string deliminated by {{' '}} (space), 
starting first with calling:
 1. {{parseAuthorizedKeyEntry("ssh-ed25519}} 
AAAAC3NzaC1lZDI1NTE5AAAAIORpOmxZnzlKim1yuHsFmcENWdBr9JuNUXuqG48d932Q 
jus...@stacksmash.net", null)
 then
 2. 
{{parseAuthorizedKeyEntry("AAAAC3NzaC1lZDI1NTE5AAAAIORpOmxZnzlKim1yuHsFmcENWdBr9JuNUXuqG48d932Q
 jus...@stacksmash.net", null)}}
 and finally 
 3. {{parseAuthorizedKeyEntry("jus...@stacksmash.net", null)}}
 where the exception is thrown as {{startPos}} on line 291 of the same file 
returns -1 and thus an exception is thrown. I checked many times to see what 
values were passed to each functions. I have attached a screenshot of the 
_{{value}}_ and _{{line}}_ variables and nothing looked irregular. Please let 
me know if you would like me to debug additional things. This is part of an SSH 
daemon plugin for Minecraft so it runs in another thread and is a bit tricky to 
debug.
 !105624.png!


was (Author: justasic):
Apologies for the delay. I did some debugging of the code. It looks like when 
it checks the code at `AuthorizedKeyEntry.java:241` it will call 
`parseAuthorizedKeyEntry` then the one which takes a resolver that is set to 
null.
It seems to parse each segment of the string deliminated by {{' '}} (space), 
starting first with calling:
1. {{parseAuthorizedKeyEntry("{{ssh-ed25519}} 
AAAAC3NzaC1lZDI1NTE5AAAAIORpOmxZnzlKim1yuHsFmcENWdBr9JuNUXuqG48d932Q 
jus...@stacksmash.net", null)}}
then
2. 
{{parseAuthorizedKeyEntry("AAAAC3NzaC1lZDI1NTE5AAAAIORpOmxZnzlKim1yuHsFmcENWdBr9JuNUXuqG48d932Q
 jus...@stacksmash.net", null)}}
and finally 
3. {{parseAuthorizedKeyEntry("jus...@stacksmash.net", null)}}
where the exception is thrown as {{startPos}} on line 291 of the same file 
returns -1 and thus an exception is thrown. I checked many times to see what 
values were passed to each functions. I have attached a screenshot of the 
_{{value}}_ and _{{line}}_ variables and nothing looked irregular. Please let 
me know if you would like me to debug additional things. This is part of an SSH 
daemon plugin for Minecraft so it runs in another thread and is a bit tricky to 
debug.
!105624.png!

> AuthorizedKeyEntry fails to parse ed25519 public keys
> -----------------------------------------------------
>
>                 Key: SSHD-974
>                 URL: https://issues.apache.org/jira/browse/SSHD-974
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>         Environment: Arch Linux compiled with OpenJDK 1.8.0_242
>            Reporter: Justin Crawford
>            Assignee: Lyor Goldstein
>            Priority: Minor
>         Attachments: 105624.png, Main.java, error.log, id_ed25519.pub, 
> id_ed25519.pub.hex
>
>
> When parsing an authorized keys file, I get a StreamCorruptedException with 
> the error message "Bad format (no key data delimiter)" however this key is 
> accepted by OpenSSH and generated by ssh-keygen. Other key types, such as 
> RSA, are parsed just fine by this parser.
> I attached an example program demonstrating how I am using the parser.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to