From 9fd3fec14918fea37368994473bd81c199501b09 Mon Sep 17 00:00:00 2001 From: bvandeusen Date: Sun, 19 Apr 2026 17:37:11 +0000 Subject: [PATCH] feat(db): migration 0003 - users.subsonic_password opt-in column Subsonic token auth (t=md5(password+salt)) needs a reversibly stored credential; bcrypt password_hash can't serve. NULL means the user has not opted in, forcing apiKey (OpenSubsonic) instead. --- internal/db/migrations/0003_subsonic_password.up.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 internal/db/migrations/0003_subsonic_password.up.sql diff --git a/internal/db/migrations/0003_subsonic_password.up.sql b/internal/db/migrations/0003_subsonic_password.up.sql new file mode 100644 index 00000000..304e0192 --- /dev/null +++ b/internal/db/migrations/0003_subsonic_password.up.sql @@ -0,0 +1,7 @@ +-- Subsonic's token auth (t = md5(password + salt)) requires the server to +-- compute md5 over the user's plaintext password. bcrypt (password_hash) is +-- not reversible, so we store a *separate*, opt-in, plaintext credential used +-- exclusively for the /rest/* legacy auth path. NULL means the user has not +-- opted into Subsonic t/s auth and must use apiKey (OpenSubsonic) instead. + +ALTER TABLE users ADD COLUMN subsonic_password text;