-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The new organization export is case sensitive in regards to the server response with ciphers and collections #3606
Comments
Since v2022.9.x it seems they changed the export endpoint and way of working. This PR fixes this by adding the export endpoint. Also, it looks like the clients can't handle uppercase first JSON key's. Because of this there now is a function which converts all the key's to lowercase first. I have an issue reported at Bitwarden if this is expected behavior: bitwarden/clients#3606 Fixes dani-garcia#2760 Fixes dani-garcia#2764
Since v2022.9.x it seems they changed the export endpoint and way of working. This PR fixes this by adding the export endpoint. Also, it looks like the clients can't handle uppercase first JSON key's. Because of this there now is a function which converts all the key's to lowercase first. I have an issue reported at Bitwarden if this is expected behavior: bitwarden/clients#3606 Fixes #2760 Fixes #2764
Hi @BlackDex, I took a look at the response model and it indeed seems we are not parsing the nested json properly. This can have unintended site effects other than the PascalCase, camelCase observed here. On another note, the servers previously returned either PascalCase or camelCase, however we removed PascalCase support on the servers a while back. While we currently have no plans to intentionally remove support from the clients I won't guarantee it will always exist. So it might be worth considering migrating to camelCase completely for vaultwarden. |
@Hinton Thanks for the reply. |
@BlackDex before I forget it, the API for export will change again once that PR is merged. We're removing the unecessary nesting, since it doesn't match how our other APIs are implemented. |
The organization export is just for the web vault, which is version tied to the server so we lucked out in this case. There is a version header that should be sent along for each request you could check. |
@Hinton, are you sure?? |
That's a good point, I had forgotten the CLI. |
@Hinton i think this ticket can be closed right? |
It will close once the PR gets merged. |
Steps To Reproduce
Not really able to reproduce this with the Bitwarden server, but it is with the Vaultwarden server.
Steps to take are simple.
Doesn't matter if this is via web-vault or cli for example.
Expected Result
A full export in JSON format with all the ciphers and collections.
Actual Result
Empty JSON, no ciphers or collections.
Screenshots or Videos
No response
Additional Context
I'm one of the main developers of Vaultwarden, and it looks like the JSON response format on how to export the vault has changed to be case-sensitive.
Previously it didn't matter if the JSON key's were like
FolderId
orfolderId
, both were excepted.If i check the code for the old way to export i see a
ListResponse
function which handles this. (clients/libs/common/src/services/api.service.ts
Lines 572 to 580 in f72ef2d
With the new function that
ListResponse
is gone, and it now is case sensitive in the parsing. (clients/libs/common/src/services/export.service.ts
Lines 239 to 242 in 5f74b9a
I wonder if this is intentional or, maybe was an oversight, since all other API's do handle both formats as far as I can tell.
Thanks in advance!
Operating System
Linux
Operating System Version
No response
Web Browser
Chrome, Firefox
Browser Version
No response
Build Version
2022.9.0+
The text was updated successfully, but these errors were encountered: