Compare commits
1
Commits
v2026.10
...
v2026.10.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3460fff8ff |
No files matched your search
@@ -45,5 +45,16 @@ Tested on an isolated copy of the stack (separate project, volume and port) with
|
|||||||
- Headless Chromium against the built UI: login form, route guards, dashboard/logs/admin rendering, reload persistence, and the TV view showing the active block and staying live after a WebSocket event. The same test was also run against the previous image to tell regressions apart from existing behavior.
|
- Headless Chromium against the built UI: login form, route guards, dashboard/logs/admin rendering, reload persistence, and the TV view showing the active block and staying live after a WebSocket event. The same test was also run against the previous image to tell regressions apart from existing behavior.
|
||||||
|
|
||||||
### Known / existing (not changed in this release)
|
### Known / existing (not changed in this release)
|
||||||
- An expired session redirects to `/login` **without** the `?redirect=` query, so after signing in the user lands on `/dashboard` instead of the page they asked for. The axios interceptor (`useApi.js`) does a hard `window.location.href = '/login'` that overrides the router guard's redirect. The previous build behaves the same way.
|
- An expired session redirects to `/login` **without** the `?redirect=` query, so after signing in the user lands on `/dashboard` instead of the page they asked for. The previous build behaves the same way. Fixed in v2026.10.1.
|
||||||
- mysql:8.4.11 upstream image findings from v1.1.0 still apply until Oracle publishes a newer 8.4.x.
|
- mysql:8.4.11 upstream image findings from v1.1.0 still apply until Oracle publishes a newer 8.4.x.
|
||||||
|
|
||||||
|
## v2026.10.1 — 2026-10-12
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- **Sign-in returns you to the page you asked for.** Opening a protected page while logged out, or having your session expire, now goes to `/login?redirect=<page>`, and you land back on that page after signing in. Before this you always landed on `/dashboard`. The axios interceptor in `useApi.js` treated the guard's own failed `/api/auth/refresh` as an expired session and hard-navigated to a bare `/login`, which overrode the router's redirect.
|
||||||
|
- **Wrong password now shows an error.** The same interceptor caught the 401 from `/api/auth/login` and reloaded the login page, so "incorrect password" never appeared. Login, register and refresh now skip the auto-refresh and report their own 401s.
|
||||||
|
- When a session expires mid-use, the interceptor now keeps the current path and query in `?redirect=`.
|
||||||
|
- `LoginView` only follows `redirect` values that are in-app paths. `//host` and `https://…` fall back to `/dashboard`.
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
Headless Chromium on an isolated stack, compared with the v2026.10 build: redirect after a logged-out visit (with query string), redirect after a mid-use expiry, wrong-password error without a reload, and external redirect values ignored. v2026.10 failed all of these; v2026.10.1 passes them.
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "homeschool-frontend",
|
"name": "homeschool-frontend",
|
||||||
"version": "2026.10.0",
|
"version": "2026.10.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "homeschool-frontend",
|
"name": "homeschool-frontend",
|
||||||
"version": "2026.10.0",
|
"version": "2026.10.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-api": "8.2.1",
|
"@vue/devtools-api": "8.2.1",
|
||||||
"axios": "1.20.0",
|
"axios": "1.20.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homeschool-frontend",
|
"name": "homeschool-frontend",
|
||||||
"version": "2026.10.0",
|
"version": "2026.10.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -17,12 +17,14 @@ api.interceptors.request.use((config) => {
|
|||||||
// Auto-refresh on 401
|
// Auto-refresh on 401
|
||||||
let refreshing = false
|
let refreshing = false
|
||||||
let waitQueue = []
|
let waitQueue = []
|
||||||
|
// These report their own 401s (wrong password, expired refresh cookie); refreshing on them would hide the error
|
||||||
|
const NO_REFRESH = ['/api/auth/login', '/api/auth/register', '/api/auth/refresh']
|
||||||
|
|
||||||
api.interceptors.response.use(
|
api.interceptors.response.use(
|
||||||
(res) => res,
|
(res) => res,
|
||||||
async (error) => {
|
async (error) => {
|
||||||
const original = error.config
|
const original = error.config
|
||||||
if (error.response?.status === 401 && !original._retry) {
|
if (error.response?.status === 401 && !original._retry && !NO_REFRESH.includes(original.url)) {
|
||||||
if (refreshing) {
|
if (refreshing) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
waitQueue.push({ resolve, reject })
|
waitQueue.push({ resolve, reject })
|
||||||
@@ -43,7 +45,10 @@ api.interceptors.response.use(
|
|||||||
waitQueue.forEach(({ reject }) => reject())
|
waitQueue.forEach(({ reject }) => reject())
|
||||||
waitQueue = []
|
waitQueue = []
|
||||||
localStorage.removeItem('access_token')
|
localStorage.removeItem('access_token')
|
||||||
window.location.href = '/login'
|
const { pathname, search } = window.location
|
||||||
|
window.location.href = pathname === '/login'
|
||||||
|
? '/login'
|
||||||
|
: `/login?redirect=${encodeURIComponent(pathname + search)}`
|
||||||
} finally {
|
} finally {
|
||||||
refreshing = false
|
refreshing = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,10 @@ async function submit() {
|
|||||||
} else {
|
} else {
|
||||||
await auth.register(form.value.email, form.value.password, form.value.fullName)
|
await auth.register(form.value.email, form.value.password, form.value.fullName)
|
||||||
}
|
}
|
||||||
const redirect = route.query.redirect || '/dashboard'
|
// Only follow in-app paths ("//host" would be protocol-relative)
|
||||||
router.push(redirect)
|
const redirect = route.query.redirect
|
||||||
|
const safe = typeof redirect === 'string' && redirect.startsWith('/') && !redirect.startsWith('//')
|
||||||
|
router.push(safe ? redirect : '/dashboard')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error.value = e.response?.data?.detail || 'Something went wrong'
|
error.value = e.response?.data?.detail || 'Something went wrong'
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in new issue
Block a user