abrignoni / abrignoni/DLEAPP

convert_cocoa_core_data_ts_to_utc assumes its input is in seconds

Aperta
#80 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
17
Fork
6
Merge medio
1h
PR unite (30g)
51

Descrizione

`convert_cocoa_core_data_ts_to_utc` in `scripts/ilapfuncs.py` adds 978307200 seconds to its input to shift a Core Data timestamp onto the Unix epoch. It never establishes that the input is in seconds, so when a column holds a value in some other unit the addition is meaningless and the result is a plausible but wrong date.

Observed on the WhatsApp macOS chat sessions artifact. `ZWACHATSESSION.ZLASTMESSAGEDATE` holds 9 digit Cocoa seconds on 122 of 125 rows. Three rows hold a 12 digit value. Cross checking each of those chats against the newest `ZWAMESSAGE.ZMESSAGEDATE` in the same chat shows the stored instant is the right month, day and time, offset by exactly 7000 and 6000 years. So the source values are corrupt rather than in a different unit, and no conversion recovers a sensible date from them.

The three rows render as a date in the wrong century either way, so this is not a regression and nothing is currently lost. Raising it because the helper will keep producing a confident wrong date for any out of range input rather than surfacing that the value could not be read.

Worth considering: report the raw value when the shifted timestamp falls outside a plausible range for the app, so an examiner sees the stored value rather than a decoded date that cannot be right.

No fix proposed here. Filed for triage.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

La funzione `convert_cocoa_core_data_ts_to_utc` si trova in `scripts/ilapfuncs.py`. Per prima cosa, esamina la sua implementazione attuale e comprendi come viene utilizzata, in particolare per l’artefatto delle sessioni chat di WhatsApp macOS. Esamina la struttura dei dati di `ZWACHATSESSION.ZLASTMESSAGEDATE` per determinare l’unità del timestamp. Quindi, determina un intervallo di date plausibile per l’app (ad esempio, 2000-2030) e implementa un controllo che segnali o riporti i valori grezzi quando il timestamp spostato non rientra in tale intervallo. Esegui i test esistenti per assicurarti che non si verifichino regressioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
cli, tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.