[Breakingchange] Get Secrets No Longer Returns The Encrypted Secret


delegatevoid

Recommended Posts

According to the documentation:

http://[address]:[port]/api?method=get_secrets[&secret=(secret)&type=encryption]

 

When "type" is set to "encryption" the response should also contain the encryption key

This worked with version 1.2.82 but as of version 1.2.91 it no longer returns the encryption key.

 

Side note: The API docs need version markers and be more consistent. 

Link to comment
Share on other sites

  • 3 weeks later...

Ok, apparently they changed the parameter from "encryption" to "encrypted". 


And yet I'm not getting the encrypted key:

http://localhost:8888/api?method=get_secrets&secret=AAAAAAAAAAAAAAAAAAAAAAAA&type=encrypted

Returns:

{ "read_only": "AAAAAAAAAAAAAAAAAA", "read_write": "BBBBBBBBBBBBBB" }

Note that I did replace the actual key values before posting here.

 

The API documentation specifies:

http://[address]:[port]/api?method=get_secrets[&secret=(secret)&type=encryption]

Yet the following line on the same page specifies:

 

  • secret (required) - must specify folder secret
  • type (optional) - if type=encrypted, generate secret with support of encrypted peer

Please note the colour coded parameter and how two different versions are used:

 

encrypted vs encryption

 

Neither values return the encrypted key for me. (v1.3.94)

Link to comment
Share on other sites

  • 1 month later...

In version 1.3.105 this has finally been fixed!

The correct type value is encryption, the API documentation is still outdated.


However it only works if you don't specify any value for "secret".

As soon as you do it doesn't work anymore.

 

When is someone from the BTSync team going to deal with the API?

Link to comment
Share on other sites

@delegatevoid

 

The correct value is encryption and it is the same in documentation. Please let me know if it is documented in a wrong way somewhere - we'll fix it.

 

Also, the "type" parameter is taken only if you are generating a new secret. If you supply API some key - it will ignore the type and get it from the key you fed. If the key can encrypt-decrypt data - API automatically will give you Encryption key as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.