Commit Graph

13 Commits

Author SHA1 Message Date
Egor Bugaev ca0605706f Security hardening round 2: comment-aware forbidden-pattern check, UPDATE confirmation, transactional batches, quote-aware split (incl. double quotes), NULL-safe table rendering, AJAX timeout, request size limit
- removeAllComments() strips -- and /* */ comments before checking
  FORBIDDEN_PATTERNS, closing a bypass where a comment inserted between
  a function name and '(' hid it from the regex (e.g. pg_read_file/**/(...)).
- UPDATE now requires confirm=true just like DELETE (deleteCount/updateCount).
- Batches run inside a single DB transaction; a failing statement rolls back
  everything already applied in that batch instead of leaving partial writes.
- splitStatements() (PHP and JS) now tracks a single quoteChar instead of a
  bool, handling both '...' strings and "..." quoted identifiers symmetrically.
- Frontend TEMPLATES no longer rely on SET/current_setting: the escaped uid
  is inlined into every statement, so partial copy/paste still works.
- renderTable() renders NULL as [NULL] instead of an empty string, so it's
  no longer visually identical to an empty string value.
- Added MAX_SQL_BYTES (1MB) request size limit, returned as HTTP 413.
- Added a 120s client-side AJAX timeout with a distinct timeout message,
  so a hung request doesn't leave the terminal paused indefinitely.
2026-07-06 19:38:25 +03:00
Egor Bugaev 8aaab998a1 Harden SQL mode: block file/program access, audit log, row limit, quote-aware statement splitting 2026-07-06 17:54:36 +03:00
Egor Bugaev d402da8498 Add SQL query templates and psql-style table output for SELECT 2026-07-06 17:16:47 +03:00
Egor Bugaev 4d87deb176 Require explicit confirmation before running DELETE statements in SQL mode 2026-07-06 17:03:51 +03:00
fanategorius b6849053d2 Update index.js 2026-07-06 16:28:22 +03:00
fanategorius b6ea7b9d92 Update index.js 2026-07-06 16:27:52 +03:00
fanategorius b98df89971 Update index.js 2026-07-06 12:51:15 +03:00
Adphi 1745aa185a fix greetings not updating date on exit 2019-01-19 19:15:22 +01:00
Adphi e5a9f0142f add scroll down on key down 2019-01-19 18:09:39 +01:00
Adphi 5e7da4b5c7 added alias c to clear and exit command 2019-01-19 16:38:43 +01:00
Adphi c642ad90f9 fixed navigation 2019-01-19 16:16:04 +01:00
Adphi 32837fffa6 renamed app 'OCC Web' 2019-01-19 15:54:24 +01:00
Adphi c909a11420 init: term colors, completion, execution 2019-01-19 15:40:52 +01:00