Piattaforme: istanza unica dopo lo spostamento dei dati, avvio sicuro del contenitore, rilascio con prove e immagine, accesso senza reindirizzamenti esterni (pkg-1, pkg-2, pkg-3, pkg-4, pkg-5, pkg-6, websec-2, web-8, websec-3)
Registro di casa 192.168.30.23:3000 (HTTP) nel modello Unraid, in compose e nel rilascio con buildx; profilo seccomp fuori da /dati. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
36 files changed
+1683
-152
No files matched your search
@@ -0,0 +1,24 @@
|
||||
// Where the login page goes after the password (spec §13.1): the page Alberto was opening («?torna=/account/12»),
|
||||
// never another site. A link can hide another site in many ways: «//host», «/\host» (a backslash counts as a slash),
|
||||
// «/%09/host» (tabs and new lines are dropped). The same rule as the server (Febe.Web.Security.LoginReturn): one path
|
||||
// that starts with a single slash, without backslashes, blanks or control characters; then the address it resolves to
|
||||
// must still be on this origin, and the page goes to that absolute address (nothing left to read twice).
|
||||
|
||||
const SAFE = /^\/(?![\/\\])[^\\\s\u0000-\u001f\u007f-\u009f]*$/;
|
||||
|
||||
export const DEFAULT_PAGE = '/libreria';
|
||||
|
||||
/** The absolute address to open after the login, on <origin> only; the library when <value> is missing or unsafe. */
|
||||
export function returnAddress(value, origin) {
|
||||
const fallback = new URL(DEFAULT_PAGE, origin).href;
|
||||
if (typeof value !== 'string' || value.length > 2048 || !SAFE.test(value)) {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
try {
|
||||
const target = new URL(value, origin);
|
||||
return target.origin === new URL(origin).origin ? target.href : fallback;
|
||||
} catch {
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user