Sessione salvata cifrata, copiata a «Ho finito» (#36, S4)
Il client del sito ha bisogno della sessione del browser di Febe: ora la copia c'è, cifrata e dietro un interruttore, senza cambiare nulla di predefinito. - Opzione «raccolta» (pagine predefinita, richieste): solo con «richieste» e almeno un'operazione configurata si costruiscono sessione salvata, client del sito e copia. Con Instagram nulla cambia: le dieci operazioni restano non configurate (mancano __spin_*, __req, __s, __dyn, __csr e altri). - Cookie con dominio, percorso, solo-host, Secure, HttpOnly e scadenza, mandati solo dove il browser li manderebbe (RFC 6265). - Sezione «page» del catalogo: dove la pagina tiene ogni valore; nuovi campi rev, hs, hsi, dpr, ccg, comet_req, entry_nonce. Il caricatore rifiuta un'operazione configurata con un valore di sessione senza fonte nella pagina. - Dati/sessione/sessione.json: DPAPI su Windows, AES-256-GCM in Docker (chiave da FEBE_CHIAVE_SESSIONE o chiave.bin), scrittura atomica, file illeggibile = nessuna sessione. «Scollega» la cancella; chiave.bin resta. - Copia a «Ho finito» con Network.getCookies e una sola Runtime.evaluate in sola lettura, solo da una pagina del sito e finché dura il permesso di guida. - FEBE_PASSWORD e FEBE_CHIAVE_SESSIONE non passano a Chromium, Xvfb, ffmpeg. - Sito di prova: csrftoken, cookie limitato a /api/, registro di moduli suo. - Revisione su tre lenti: 11 punti confermati, tutti corretti. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3046b2da47
commit
c87768766c
69 files changed
+5936
-415
No files matched your search
@@ -133,4 +133,16 @@ public sealed record DataFolderLayout
|
||||
|
||||
/// <summary>Dati/segnali.json.</summary>
|
||||
public string SignalsFile => Path.Combine(Root, "segnali.json");
|
||||
|
||||
/// <summary>
|
||||
/// Dati/sessione: the saved session of the site client, encrypted, owner-only (issue #36, §13.2). Not in the
|
||||
/// database, so never in the daily copies; never read by the diagnostic report.
|
||||
/// </summary>
|
||||
public string Session => Path.Combine(Root, "sessione");
|
||||
|
||||
/// <summary>Dati/sessione/sessione.json: the encrypted saved session.</summary>
|
||||
public string SessionFile => Path.Combine(Session, "sessione.json");
|
||||
|
||||
/// <summary>Dati/sessione/chiave.bin: the AES key in Docker when FEBE_CHIAVE_SESSIONE is not set.</summary>
|
||||
public string SessionKeyFile => Path.Combine(Session, "chiave.bin");
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using Febe.Core.Security;
|
||||
|
||||
namespace Febe.Core.Library;
|
||||
|
||||
@@ -63,7 +64,12 @@ public sealed class VideoFrameExtractor
|
||||
return null;
|
||||
}
|
||||
|
||||
private async Task<byte[]?> RunAsync(string videoPath, string seek, CancellationToken ct)
|
||||
/// <summary>
|
||||
/// The start of ffmpeg for one frame of <paramref name="videoPath"/> at <paramref name="seek"/> seconds: its
|
||||
/// arguments, and the environment of Febe without <c>FEBE_PASSWORD</c> and <c>FEBE_CHIAVE_SESSIONE</c>, removed last
|
||||
/// (spec §13.2).
|
||||
/// </summary>
|
||||
internal ProcessStartInfo BuildStartInfo(string videoPath, string seek)
|
||||
{
|
||||
var start = new ProcessStartInfo(Executable)
|
||||
{
|
||||
@@ -78,7 +84,12 @@ public sealed class VideoFrameExtractor
|
||||
start.ArgumentList.Add(argument);
|
||||
}
|
||||
|
||||
using var process = new Process { StartInfo = start };
|
||||
return start.WithoutSecrets();
|
||||
}
|
||||
|
||||
private async Task<byte[]?> RunAsync(string videoPath, string seek, CancellationToken ct)
|
||||
{
|
||||
using var process = new Process { StartInfo = BuildStartInfo(videoPath, seek) };
|
||||
try
|
||||
{
|
||||
if (!process.Start())
|
||||
|
||||
Reference in new issue
Block a user