From noreply@github.com Fri Aug 7 12:05:59 2026 From: emre brookes To: us-commits@biophysics.uleth.ca Subject: [us-commits] [ehb54/us3lims_dbinst] e58bdf: CSP: eliminate all remaining inline handlers, scri... Date: Fri, 07 Aug 2026 11:05:54 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7985147536318251948==" --===============7985147536318251948== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Branch: refs/heads/ehb54-issue-478-rebase Home: https://github.com/ehb54/us3lims_dbinst Commit: e58bdf84581fc1c0ac08f40fde6db756770d006d https://github.com/ehb54/us3lims_dbinst/commit/e58bdf84581fc1c0ac08f40f= de6db756770d006d Author: ehb54 Date: 2026-08-07 (Fri, 07 Aug 2026) Changed paths: M 2DSA-CG_2.php M 2DSA_2.php M DMGA_2.php M GA_2.php M GA_3.php M PCSA_2.php A css/edit_users.css M css/queue_viewer.css A css/view_people_audit.css M edit_users.php M edit_users_actions.php M header.php M js/GA_2.js M js/queue_viewer.js M js/sorttable.js M js/supporting_files_setup.js M queue_content.php M queue_viewer.php M report_detail.php M solution_detail.php M supporting_files.php M view_people_audit.php Log Message: ----------- CSP: eliminate all remaining inline handlers, scripts and styles Brings the tree to zero violations of default-src 'self'. Inline event handlers: - queue_content.php (6): the checkboxes already carried data-runid / data-analtype / data-status / data-gfacid holding exactly the arguments the inline handlers passed, so the new listeners read them straight from the dataset. These must be delegated from the document, not bound directly: update_queue_content() replaces #queue_content wholesale on every poll, so directly bound handlers would be dropped each refresh. - supporting_files.php (9): bound in js/supporting_files_setup.js, which already runs at the bottom of that page. This markup is static, so the controls are bound directly rather than delegated. - queue_viewer.php: dropped $onload, which header.php injected onto ; js/queue_viewer.js now starts polling on DOMContentLoaded. It was the only user of the $onload mechanism, so header.php no longer carries it. javascript: URLs: - report_detail.php, solution_detail.php: close links now use the onclick-window-close class. Both build their own and did not load main.js, so they now do. - js/sorttable.js: removed the IE branch that document.write()'s a script element with a javascript URL. It sat inside a JScript conditional compilation block, which no browser has honoured since IE11 dropped it in 2013, so it was already dead everywhere. Inline styles: - edit_users_actions.php (12 identical): .form-section-header in the new css/edit_users.css. - 2DSA_2, 2DSA-CG_2, DMGA_2, GA_3, PCSA_2: red bold error spans now use the shared text-red + font-bold utilities. - queue_content.php: #selection_controls moved to css/queue_viewer.css; the bulk-delete button uses the d-none class, and queue_viewer.js toggles that class instead of calling jQuery show()/hide(). - view_people_audit.php: 62-line inline