tangled
alpha
login
or
join now
devins.page
/
tinysub
10
fork
atom
a simple web player for subsonic
tinysub.devins.page
subsonic
navidrome
javascript
10
fork
atom
overview
issues
8
pulls
pipelines
fix: security migration
devins.page
1 week ago
d0f71dce
903e4d37
+18
-1
1 changed file
expand all
collapse all
unified
split
src
js
auth.js
+18
-1
src/js/auth.js
reviewed
···
110
110
location.reload();
111
111
}
112
112
113
113
-
// attempt auto-login with stored credentials on page load
113
113
+
// attempt auto-login on page load
114
114
async function attemptAutoLogin() {
115
115
const creds = CredentialManager.load();
116
116
+
117
117
+
// security migration in case you were using version <1.8 which stored raw passwords
118
118
+
const oldCredentials = localStorage.getItem("tinysub_credentials");
119
119
+
if (oldCredentials) {
120
120
+
try {
121
121
+
const parsed = JSON.parse(oldCredentials);
122
122
+
if (parsed.password) {
123
123
+
console.warn(
124
124
+
"[Auth] Old password format detected, clearing storage and logging out for security",
125
125
+
);
126
126
+
await handleLogout();
127
127
+
return;
128
128
+
}
129
129
+
} catch {
130
130
+
// ignore
131
131
+
}
132
132
+
}
116
133
117
134
// no stored credentials
118
135
if (!creds.server || !creds.username || !creds.token || !creds.salt) {