Analyse: Messdienst: Ping ohne Einwilligung, Zeitstempel auf Stunde, Pfade ohne Kennungen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d64a18d35
commit
96409c6306
7 files changed
+149
-10
No files matched your search
@@ -136,3 +136,17 @@ test('OPTIONS-Preflight: CORS-Köpfe nur für erlaubte Origins bekannter Website
|
||||
assert.equal((await pre('abc', 'https://kunde.de')).headers.get('access-control-allow-origin'), null);
|
||||
s.close();
|
||||
});
|
||||
|
||||
test('Heatmap: gleiche Stunde (ts-Gleichstand), Limit schneidet über die niedrigste id ab', async () => {
|
||||
const s = await setup();
|
||||
const ins = s.db.prepare('INSERT INTO clicks (site, ts, path, vp, x, y) VALUES (?,?,?,?,?,?)');
|
||||
const ts = NOW - 3600000;
|
||||
ins.run(KEY, ts, '/g', 'd', 0.99, 0.99); // niedrigste id
|
||||
s.db.exec('BEGIN');
|
||||
for (let i = 0; i < 5000; i++) ins.run(KEY, ts, '/g', 'd', 0.5, 0.5);
|
||||
s.db.exec('COMMIT');
|
||||
const j = await (await s.get(tok({ path: '/g' }))).json();
|
||||
assert.equal(j.points.length, 5000);
|
||||
assert.ok(!j.points.some((p) => p.x === 0.99));
|
||||
s.close();
|
||||
});
|
||||
Reference in new issue
Block a user