mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 17:23:04 +03:00
version is not a valid key of server in the JSON returned from api/config
#396
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zacknewman on GitHub.
Vaultwarden Support String
Not applicable.
Steps To Reproduce
Read source code:
Expected Result
serverto either benulllike upstream:or to only contain the keys
nameandurlas defined upstream:Actual Result
servercontains a keyversion.Screenshots or Videos
No response
Logs
No response
Additional Context
No response
Host/Server Operating System
Linux
Operating System Version
No response
Deployment method
Other method
Custom deployment method
No response
Vaultwarden Build Version
1.32.0
Clients
Web Vault
Client Version
v2024.7.2
@dani-garcia commented on GitHub:
The
serverentry is there to be used only by third party servers, so it makes sense that it's not upstreamc782c92f6c/libs/common/src/platform/models/data/server-config.data.ts (L22-L25)This was meant to be used by the clients to change help links to our repo but as far as I know it hasn't happened yet.
Now that the clients are using the
versionfield in the root to do compatibility checks, that's forced us to lie about our version number, I think theversionwas added toserverto still have the real value somewhere. Not really necessary though, as we still have thegitHash@zacknewman commented on GitHub:
That explains why it should not be
null, but the same file you linked does not define aversionkey:If the clients were ever to be strict with JSON deserialization by rejecting unknown keys—something I highly doubt will happen—then this would cause issues. I see you made a bunch of changes to the JSON payloads that are sent (specifically changing PascalCase to camelCase), so I thought a reason for that is to mirror more closely what the clients expect. Feel free to close if you don't care about this.
@dani-garcia commented on GitHub:
Oh yeah that's what I was trying to say, but maybe wasn't very clear, the server being non-null is expected, but the internal version value is a thing we added ourselves outside of "spec". I don't think it provides much value, so it should be safe to remove.