tracker
All repositories: gitoria
2.4 KB
// tests/seed-xss.hl — GATE FIXTURE for the security gate (tests/security.mjs): a movie, a person and a genre whose text is HTML /// script, in every field a page prints. The app is stopped while this runs. Self-assigned ids, one put() each.import { MPackDB } from 'hl:mpackdb'import { env } from 'hl:proc'storageDir = env('TRACKER_STORAGE')if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }genresTable = new MPackDB(file = storageDir + '/genres.db', primaryKey = '@id', indexes = ['!oldId'])personsTable = new MPackDB(file = storageDir + '/persons.db', primaryKey = '@id', indexes = ['!oldId'])showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])seasonsTable = new MPackDB(file = storageDir + '/seasons.db', primaryKey = '@id', indexes = ['!oldId'])episodesTable = new MPackDB(file = storageDir + '/episodes.db', primaryKey = '@id', indexes = ['!oldId'])evil = '</script><img src=x onerror=window.__xss=1>"\'<svg onload=window.__xss=2>'genresTable.put({ id = 'xssg00000000000g' name = 'G' + evil urlSegment = 'xss-genre' tmdbId = 99001 oldId = 'xssg' })personsTable.put({ id = 'xssp00000000000p' name = 'P' + evil urlSegment = 'xss-person' tmdbId = null oldId = 'xssp' bio = 'B' + evil })seasonsTable.put({ id = 'xsss00000000000s' seasonNumber = 1 title = 'S' + evil release = null summary = 'SS' + evil show = 'xsst00000000000t' episodes = ['xsse00000000000e'] oldId = 'xsss' })episodesTable.put({ id = 'xsse00000000000e' episodeNumber = 1 seasonNumber = 1 title = 'E' + evil summary = 'ES' + evil release = '2020-01-01' show = 'xsst00000000000t' season = 'xsss00000000000s' oldId = 'xsse' })showsTable.put({adult = false id = 'xsst00000000000t' title = 'T' + evil summary = 'M' + evil tmdbSummary = null tmdbId = nulllanguage = 'en' type = 'series' release = '2020-01-01' year = 2020 image = null urlSegment = 'xss-title'episodesCount = 1 homepage = 'javascript:window.__xss=3' imdbId = '"><img src=x onerror=window.__xss=4>' seasonsCount = 1 status = 'Ended' tagline = 'T' + eviltvdbId = null tvmzId = null genres = ['xssg00000000000g'] cast = [{ person = 'xssp00000000000p' character = 'C' + evil actor = 'A' + evil }]seasons = ['xsss00000000000s'] oldId = 'xsst' tmdbSync = 1})genresTable.persist()personsTable.persist()showsTable.persist()seasonsTable.persist()episodesTable.persist()console.log('seed-xss: 1 series, 1 person, 1 genre with HTML in every text field')
Branches
Latest commits
- f0b86c8efranchises: 40 loose timelines per page (/franchises/page/N) and a merge sort for the names (1,546 timelines: 20 s and 54,000 px before)mre
- b9e841a7Merge branch 'sy-sync'mre
- d1ae2701sync components.hybriel 4922f9c: modal and pagination 44 px targets (vendored copies, verbatim) (SY)mre
- 043624b2theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
- 05d89fd0deploy: security gate (tests/security.mjs)mre
- 2ae8a47bMerge branch 'sk-sec'mre
- 8fee5d52sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
- 944ad51eSK: report reports/SK-sec.md, LOGsk
- 415487c1SK: import budget per user + id type check, gate checkssk
- 7b8a4f74security audit SK: nosniff + image sandbox headers, face id checks, adult follow, login budget + new session at login, guest-link budget, tests/security.mjssk
- f0f26c5areports: T18 section (gates, boot-gate, 3x3 table, search + short-id compare)mre
- 2a8682a1deploy.sh GATES: tests/warmstart.mjsmre
- 3761338breports/T17-boot.md: handoff (phase table, fix, numbers so far, open proof)mre
- 52e09eb2boot: sync window 1000 ms (the gates ask for a complete start), README boot-time sectionmre
- c87149e8tests/warmstart.mjs: the progressive start proven over HTTP (note in the window, 503 short id, after: everything); bootBeginmre
- 593a6350boot: resumable start-up scan, the server listens first (T17)mre
- be4890a0reports: H2 hydration audit (no test change needed)mre
- 1f9c8bf4re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- c1df88eddocker-compose: HL_GC_TABLE_LOAD=62 (tracker mission 048, T16 real-data numbers)mre
- d0a82867mission 048: report, LOG (HL_GC_TABLE_LOAD=62 measured)mre