Hirevo / mega-rs

An API client library for interacting with MEGA from Rust

Home Page:https://crates.io/crates/mega

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

assertion error in rsa.rs

fukttt opened this issue · comments

Thanks for the bug report !

This code is called when trying to decode the RSA private key as one of the final steps after logging in.

In the latest release, I did change how the RSA private key gets decoded and stored, as a first step towards supporting shared nodes between MEGA contacts (or files uploaded through a public link).
This change attempts to decode the whole private key, instead of just the portions needed for the end of the login ceremony.

But it turns out that not some accounts may not have an associated RSA private key (or not a "complete" one).

As of now, I am not fully sure of exactly what causes an account to not have a complete private RSA private key.
For instance, I encounter no such issues with none of my accounts, so I am not sure what may be different.

I'll look into this more and consider releasing a fix for such accounts.

Although, I do have a few questions for you:

  • Did you use mega-rs before the 0.7.1 release, and if so, did you previously have such issue or did it work just fine back then ?
  • MEGA seems to have a concept of ephemeral/incomplete accounts, which are (from my understanding) accounts that haven't completed the registration process, so is your account fully registered (like for instance, have you completed your email address confirmation with MEGA) ?

This bug was in 0.7.2.
When u released 0.7.2 i hoped that u fixed it, but no.
Can u fix it or how to make it myself ?
In rust im newbie

Awesome job ! Thank you !