mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-21 06:12:21 +02:00
fix(email): enforce account ownership and correct partial failure accounting
- Validate account ownership with _assert_owns_account for every account_id - Deduplicate items in selection to prevent duplicate files and skewed accounting - Fix exception handling in IMAP batching to avoid double-counting on partial failures - Re-raise HTTPException so 413 memory cap errors are not swallowed - Remove unused addField helper in emailLibrary print exporter - Add behavioral test suite covering empty/oversized validation, rfc822 export, zip export, partial failure/dedup, and cross-tenant account isolation
This commit is contained in:
@@ -1143,19 +1143,6 @@ async function _printSelectedEmails(messages) {
|
||||
};
|
||||
await Promise.all(Array.from({ length: Math.min(4, messages.length) }, readWorker));
|
||||
|
||||
const addField = (doc, parent, label, value) => {
|
||||
if (!value) return;
|
||||
const row = doc.createElement('div');
|
||||
row.className = 'email-export-pdf-field';
|
||||
const labelEl = doc.createElement('span');
|
||||
labelEl.className = 'email-export-pdf-label';
|
||||
labelEl.textContent = label;
|
||||
const valueEl = doc.createElement('span');
|
||||
valueEl.textContent = value;
|
||||
row.append(labelEl, valueEl);
|
||||
parent.appendChild(row);
|
||||
};
|
||||
|
||||
// Build sanitized HTML for the print frame -- scripts and event handlers
|
||||
// cannot execute inside the sandboxed iframe.
|
||||
const articles = [];
|
||||
|
||||
Reference in New Issue
Block a user