Aug 26 - Update password detect against off field 2
CI / Python lint (flake8) (push) Has been cancelled
CI / Python syntax check (push) Has been cancelled
CI / Alembic migration chain (push) Has been cancelled
CI / JavaScript syntax check (push) Has been cancelled
CI / Pytest (push) Has been cancelled
CI / Build extension zip (push) Has been cancelled

This commit is contained in:
2026-08-26 15:05:48 -04:00
parent 2f1afb143c
commit 0d7d9c1403
12 changed files with 677 additions and 99 deletions
+5 -3
View File
@@ -23,9 +23,11 @@ class VaultItem(db.Model):
user_id = db.Column(INTEGER(unsigned=True), db.ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
folder_id = db.Column(INTEGER(unsigned=True), db.ForeignKey('folders.id', ondelete='SET NULL'), nullable=True)
item_type = db.Column(db.String(20), nullable=False, default=ItemType.PASSWORD.value)
# name is stored in plaintext for display in the vault list.
# All other sensitive fields (username, password, URL, notes, etc.)
# are inside enc_data and are encrypted client-side with AES-256-GCM.
# NOT the user-visible name — that lives encrypted in enc_name/iv_name below.
# This column holds the item TYPE string only (the same value as item_type),
# kept because the column is NOT NULL and predates enc_name. Writing a real
# item name here would hand the server plaintext the zero-knowledge model
# promises it never sees.
name = db.Column(db.String(255), nullable=False)
enc_data = db.Column(db.Text, nullable=False) # base64-encoded AES-256-GCM ciphertext
iv = db.Column(db.String(64), nullable=False) # base64-encoded 12-byte GCM nonce