[ehb54/us3lims_dbinst] 614fa1: CSP updates -wip
Branch: refs/heads/ehb54-issue-478 Home: https://github.com/ehb54/us3lims_dbinst Commit: 614fa1e91861939ccfaf1842ea1993215ba953f2 https://github.com/ehb54/us3lims_dbinst/commit/614fa1e91861939ccfaf1842ea199... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M 2DSA-CG_1.php M 2DSA_1.php M DMGA_1.php M GA_1.php M GA_2.php M PCSA_1.php M admin_edit_projects.php M admin_view_projects.php M data_sharing.php M edit_instruments.php M edit_labs.php M edit_projects.php M edit_users_actions.php M global_menu.php M globaldb_stats.php M header.php M js/2DSA.js M lib/controls.php M lib/motd.php M lib/reports.php M lib/selectboxes.php R lib/slider.php M lib/utility.php M links.php M login.php M mysql_admin.php M newaccount.php M print_version.php M profile.php M queue_setup_1.php M queue_setup_2.php M queue_setup_2_funcs.php M queue_setup_3.php M queue_viewer.php M runID_info.php M supporting_files.php M view_all.php M view_projects.php M view_users.php Log Message: ----------- CSP updates -wip Commit: 7648a96c7aff00c9db977c9fab2fa9a0327c730f https://github.com/ehb54/us3lims_dbinst/commit/7648a96c7aff00c9db977c9fab2fa... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M 2DSA-CG_1.php M 2DSA_1.php M DMGA_1.php M GA_1.php M GA_2.php M PCSA_1.php M admin_edit_projects.php M admin_view_projects.php M edit_projects.php M globaldb_stats.php M header.php M links.php M login.php M mysql_admin.php M newaccount.php M print_version.php M queue_setup_1.php M queue_setup_2.php M queue_setup_3.php M supporting_files.php M view_all.php M view_projects.php Log Message: ----------- better class names Commit: f52edb63fe03f235dc2b3c989635163fa5415f4c https://github.com/ehb54/us3lims_dbinst/commit/f52edb63fe03f235dc2b3c9896351... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M lib/controls.php M lib/motd.php M lib/utility.php Log Message: ----------- better class names Commit: 158ff0bac8edad62c3422ec95ad138c29db7977c https://github.com/ehb54/us3lims_dbinst/commit/158ff0bac8edad62c3422ec95ad13... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: A js/reports_install_change_handlers.js M view_reports.php Log Message: ----------- reports.php - inline script to js file, CSP Commit: f425e6543973d613cbe876c96dd1033fe6886acf https://github.com/ehb54/us3lims_dbinst/commit/f425e6543973d613cbe876c96dd10... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: A js/reports_lib_changedoctype.js M lib/reports.php Log Message: ----------- reports.php - inline script to js file, CSP Commit: 9459113510f91d91a060931ebce4fc530cc9ca98 https://github.com/ehb54/us3lims_dbinst/commit/9459113510f91d91a060931ebce4f... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: A js/queue_setup_1_selectallcells.js M queue_setup_1.php Log Message: ----------- queue_setup_1.php - inline script to js file, CSP Commit: 9f9beda147dcb3d3c831c254d928987eaf4e8d96 https://github.com/ehb54/us3lims_dbinst/commit/9f9beda147dcb3d3c831c254d9289... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: A js/supporting_files_setup.js M supporting_files.php Log Message: ----------- supporting_files.php - inline script to js file, CSP Commit: dca6ef967a866fdd10d791c06f69e73aa297b4b3 https://github.com/ehb54/us3lims_dbinst/commit/dca6ef967a866fdd10d791c06f69e... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M 2DSA-CG_2.php M 2DSA_2.php M PCSA_2.php Log Message: ----------- 2DSA, 2DSA-CG, PCSA _2.php - remove us_submit_prog display scripts - CSP Commit: 8f5f52b7e5b11742da50a41e9b95c0ef73594684 https://github.com/ehb54/us3lims_dbinst/commit/8f5f52b7e5b11742da50a41e9b95c... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M js/queue_setup_1_selectallcells.js M queue_setup_1.php Log Message: ----------- queue_setup_1.php - fix selectAllCells handler name mismatch, CSP The extracted handler defined SelectAllCells() and the button carried class 'onclick-SelectAllCells', but the delegated listener in us3lims_common js/main.js matches 'onclick-selectAllCells' and calls selectAllCells(). classList.contains() is case-sensitive, so the button was a no-op and the call would have thrown ReferenceError. Align both with the name main.js already uses. Commit: e6eded9d9ba7521f169dc47092d8a74521571129 https://github.com/ehb54/us3lims_dbinst/commit/e6eded9d9ba7521f169dc47092d8a... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M GA_2.php Log Message: ----------- GA_2.php - fix solutes validate handler class name, CSP The form carried class 'onsubmit-return-solutes-args' but the delegated submit listener in us3lims_common js/main.js matches 'onsubmit-return-validate-solutes-args'. The form therefore fell through to the default branch and submitted without running validate_solutes(). The data-args payload already matches what main.js expects. Commit: de64beedf09b73d01946e292d13f8b4863e47a13 https://github.com/ehb54/us3lims_dbinst/commit/de64beedf09b73d01946e292d13f8... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M view_reports.php Log Message: ----------- view_reports.php - drop stray trailing whitespace at EOF Commit: 371ae67fdb733277085f7b28283935a42ed48944 https://github.com/ehb54/us3lims_dbinst/commit/371ae67fdb733277085f7b2828393... Author: ehb54 <brookes@uthscsa.edu> Date: 2026-09-28 (Mon, 28 Sep 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 <body>; 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 <html> 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 <style> block extracted to the new css/view_people_audit.css. Also fixes js/GA_2.js, which contained a raw <?php echo $sol_count; ?>. The file is served statically as .js, so the tag was never executed -- it reached the browser verbatim and made the whole script a syntax error, leaving get_solute_count() and validate_solutes() undefined on GA_2.php. Both are targets of delegated CSP handlers, so the conversion could not have worked there. The rendered count now arrives via a data-rendered-count attribute on #sol. Commit: 4703e6671c70adcd32d66ea56de04afa9d4ac596 https://github.com/ehb54/us3lims_dbinst/commit/4703e6671c70adcd32d66ea56de04... Author: aaron-auc <aaron@aucsolutions.com> Date: 2026-09-28 (Mon, 28 Sep 2026) Changed paths: M js/reports.js R js/reports_lib_changedoctype.js M lib/reports.php Log Message: ----------- Delegate report filters without evaluating scripts in AJAX fragments Compare: https://github.com/ehb54/us3lims_dbinst/compare/9930b863257b...4703e6671c70 To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/us3lims_dbinst/settings/notifications
participants (1)
-
aaron-auc