Skip to content

General fixes and security improvements#199

Merged
iMattPro merged 3 commits into
phpbb-extensions:masterfrom
iMattPro:improvements
Jun 16, 2026
Merged

General fixes and security improvements#199
iMattPro merged 3 commits into
phpbb-extensions:masterfrom
iMattPro:improvements

Conversation

@iMattPro

Copy link
Copy Markdown
Contributor

No description provided.

iMattPro added 3 commits June 15, 2026 20:00
Removing for security reasons due to XHR to raw.githubusercontent.com in bundled code. Bad for privacy, CSP, offline/local installs, and reliability.
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.67%. Comparing base (bd9b7a6) to head (fa9c091).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #199   +/-   ##
=========================================
  Coverage     98.67%   98.67%           
  Complexity      285      285           
=========================================
  Files            38       38           
  Lines           905      907    +2     
=========================================
+ Hits            893      895    +2     
  Misses           12       12           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on tightening security around “visual demo” ad rendering and removing the external adblock-detection dependency by replacing it with a small local detector.

Changes:

  • Render “visual demo” ad locations via structured template data (escaped in Twig) instead of injecting raw HTML strings.
  • Replace just-detect-adblock (bundled UMD + npm metadata) with a local detector.js and same-origin bait request.
  • Fix/adjust ACP ad-location <optgroup> rendering and make minor markup tweaks in the ad management UI.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
styles/all/template/phpbb_ads_macro.html Adds safe visual-demo rendering branch (escaped name/desc).
styles/all/template/js/detector.js Introduces local adblock detection (DOM bait + optional fetch bait).
styles/all/template/js/bundle.umd.js Removes bundled third-party adblock detector.
styles/all/template/js/adsbygoogle.js Adds same-origin “bait” asset for request-based detection.
styles/all/template/event/overall_header_stylesheets_after.html Avoids outputting AD_SCRIPTS when it’s an iterable (visual demo).
styles/all/template/event/overall_footer_body_after.html Switches inline detection call to the new local detector + bait URL.
styles/all/template/event/overall_footer_after.html Updates JS include to load the new detector script when enabled.
package.json Removes npm dependency metadata no longer needed.
package-lock.json Removes npm lockfile no longer needed.
event/main_listener.php Changes visual-demo assignment from HTML string to structured array consumed by Twig.
config/services.yml Fixes banner service DI args by removing an unused/incorrect parameter.
adm/style/manage_ads.html Fixes optgroup handling and adjusts some markup in the ACP form.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iMattPro iMattPro merged commit 096afce into phpbb-extensions:master Jun 16, 2026
38 checks passed
@iMattPro iMattPro deleted the improvements branch June 16, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants