mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-11-04 10:40:20 +00:00
fix: preserve vault fields and align cipher compatibility
Preserve linked and unknown encrypted fields in Web edits, reject stale and concurrent saves, and support official bulk delete and restore methods while retaining legacy routes. Add 20 offline compatibility regressions and update undici to 8.10.2. Verified 51 tests, TypeScript checks, locale validation, Web build and Worker deployment dry run. The unpatched braces advisory remains visible.
This commit is contained in:
1 parent
5f71cb388c
commit
293f5ce196
26 files changed
+456
-25
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { hkdf } from '@/lib/crypto';
|
||||
import { cipherFieldMetadata } from './cipher-fields';
|
||||
import { t } from '@/lib/i18n';
|
||||
import type { VaultDraft } from '@/lib/types';
|
||||
import type { ImportResultSummary } from '@/components/ImportPage';
|
||||
@@ -206,6 +207,8 @@ export function importCipherToDraft(cipher: Record<string, unknown>, folderId: s
|
||||
const fieldType = parsedType === 1 || parsedType === 2 || parsedType === 3 ? (parsedType as 1 | 2 | 3) : 0;
|
||||
return {
|
||||
type: fieldType,
|
||||
// Plaintext import cannot safely pass through unknown encrypted values.
|
||||
...cipherFieldMetadata({ linkedId: field.linkedId }),
|
||||
label,
|
||||
value: asText(field.value),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user