mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-24 09:03:15 -05:00
[PR #3332] [MERGED] Merge ClientIp with Headers. #12135
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?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3332
Author: @BlackDex
Created: 3/11/2023
Status: ✅ Merged
Merged: 3/15/2023
Merged by: @dani-garcia
Base:
main← Head:merge-clientip-with-headers📝 Commits (1)
9e5b949Merge ClientIp with Headers.📊 Changes
17 files changed (+256 additions, -422 deletions)
View changed files
📝
src/api/admin.rs(+19 -18)📝
src/api/core/accounts.rs(+5 -11)📝
src/api/core/ciphers.rs(+73 -155)📝
src/api/core/events.rs(+5 -10)📝
src/api/core/organizations.rs(+56 -117)📝
src/api/core/two_factor/authenticator.rs(+3 -5)📝
src/api/core/two_factor/duo.rs(+5 -5)📝
src/api/core/two_factor/email.rs(+4 -4)📝
src/api/core/two_factor/mod.rs(+16 -23)📝
src/api/core/two_factor/webauthn.rs(+5 -15)📝
src/api/core/two_factor/yubikey.rs(+6 -16)📝
src/api/identity.rs(+12 -5)📝
src/api/notifications.rs(+2 -27)📝
src/auth.rs(+25 -0)📝
src/db/models/cipher.rs(+4 -3)📝
src/main.rs(+13 -4)📝
src/util.rs(+3 -4)📄 Description
Since we now use the
ClientIpGuard on a lot more places, it also increases the size of binary, and the macro generated code because of this extra Guard. By merging theClientIpGuard with the severalHeaderguards we have it reduces the amount of code generated (including LLVM IR), but also a small speedup in build time.I also spotted some small
json!()optimizations which also reduced the amount of code generated.There was no decrease in the speed of the code as far as i could tell. It btw also lowered the amount of allocations done.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.