Repository navigation
[Develop] Fix 13 Dependabot alerts and 4 Garuda findings: DOMPurify 3.4.17, notice dismissals, SureForms recorder upload - #2255
Merged
Conversation
KMchaudhary
approved these changes
Oct 26, 2026
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM". |
0 |
trademarked_term | The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name. |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/10/29/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/10/29/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
The qs override moves from 6.16.0 to 6.16.1, the release that fixes GHSA-6pq8-jhm2-2vcw (qs.stringify with arrayFormat 'comma' throws on elements without a callable toString). qs is only used by express inside the webpack dev server, so the built plugin files do not change.
rudrakshi-gupta
approved these changes
Oct 29, 2026
subodhr258
added a commit
that referenced
this pull request
Oct 29, 2026
package.json: take develop's fast-uri ^3.1.9 from #2255. package files now differ from develop only in the 2.5.2 version.
KMchaudhary
added a commit
that referenced
this pull request
Oct 30, 2026
* Add Marketo form layer support (V1) (#2218) * Add Marketo form layer support (V1) Lets any site using Marketo embed a Marketo form as a video layer from the GoDAM UI, replacing the custom VideoJet-only shortcode implementation. Marketo is modeled as a new `form_type: 'marketo'` under the existing `form` layer type, so it reuses the whole form pipeline (FormLayerManager show/hide, pause, skip button, analytics, timeline markers) with no new JS manager. It differs from the other form integrations in three ways: * No WordPress plugin to activate. Availability is instead "enabled with a Pod ID and Munchkin ID configured", exposed as `videoData.marketoActive` and `godamPluginDependencies.marketo`. * No form-list API, so the editor takes the Marketo Form ID as a plain text input rather than the FormSelector combobox. * No shortcode. The player template emits an empty `<form id="mktoForm_<id>">` and Marketo_Form_Assets enqueues the instance's forms2 library plus an init script that calls `MktoForms2.loadForm()` — mirroring the Jetpack integration, which also renders markup directly and enqueues its own assets. The Pod ID accepts either Marketo instance form (`app-sj04.marketo.com` or `123-ABC-456.mktoweb.com`), with or without a scheme; a bare identifier with no dot falls back to `<id>.mktoweb.com`. Marketo::get_instance_host() normalizes it once so the editor preview and the frontend always target the same instance. The editor renders a live preview of the form over the video as soon as a form ID is entered (debounced), using the same forms2 path as the frontend. Settings live under GoDAM Settings > Integrations > Marketo and persist via the existing `godam_default_integration_settings` and `godam_sanitize_integration_settings` filters. The reCAPTCHA site key is stored but not yet applied; wiring up Google reCAPTCHA v3 is follow-up work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(marketo): manage the Marketo connection from the integration tab Make GoDAM Central the source of truth for the Marketo connection and let a WordPress admin manage it from Settings > Integrations > Marketo. Add a server-to-server REST proxy (godam/v1/marketo/status|forms|connect|test) that calls Central's map_wordpress API with the licence key in X-API-KEY. The browser never sees the licence key or the Marketo credentials. When the integration is on, the tab reads the connection status from Central and shows one of two things: a short form to connect Marketo directly from WordPress when it is not connected, or the connection details read-only when it is. The Munchkin ID alone connects for forms; the Client ID and Client Secret are optional and add the form list and video-view tracking. Disconnect and the tracking switch stay on Central, which the tab links out to. Form rendering now takes the Munchkin ID, forms host and reCAPTCHA key from Central, falling back to the local values so existing sites keep working. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(marketo): only render the form layer when Marketo is connected on Central A Marketo form layer rendered on videos, and previewed in the editor, even when Marketo was not connected or the integration was turned off. The form showed because the plugin fell back to a Pod/Munchkin ID left in local settings by the earlier version, so forms2 rendered with a stale account. GoDAM Central is the source of truth, so make the Marketo account details (Munchkin ID, forms host, reCAPTCHA key) and Marketo::is_configured() read only from Central's connection; nothing stored locally can make a form render. The player template now skips the Marketo layer unless Marketo::is_configured(), so a disconnected or disabled Marketo no longer shows an empty form overlay on the video. A successful connect from the plugin now force-refreshes the cached verify response, so a new connection shows on videos right away instead of after the hourly cache expiry. Update the editor warning and preview text to the Central based wording. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * style(marketo): primary/secondary action buttons on the connected card Show Manage on GoDAM as a primary button (opening GoDAM in a new tab) and Test connection as a secondary button, replacing the plain links. Manage on GoDAM keeps an external-link affordance using the external icon from @wordpress/icons rather than a dashicon. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(settings): remember the open settings tab and integration sub-tab in the URL The settings page reset to the first tab on reload. Persist the active top-level tab as a settings_tab query param and the active integration sub-tab as an integration_tab query param, both written without reloading or adding history, so a reload or a shared link reopens the same tab. The top-level tabs previously used the URL hash; that still works as a fallback (the plugin links to tabs by hash in several places) and is normalized to the query param on load. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat: add HubSpot form layer to the video editor and player Add a native HubSpot form layer, gated on the HubSpot (leadin) plugin being active and connected to a HubSpot account. - Editor: HubSpot provider in the form-layer registry and add-layer menu, with a form picker populated from the connected account (new godam/v1/hubspot-forms REST proxy) and a live form preview. - REST: Hubspot_Forms lists the account's forms using a short-lived access token obtained from leadin's own endpoint. - Frontend: render the form on the page via leadin's [hubspot] shortcode and register HubSpot in the player's form-type dependency map. * fix: HubSpot form layer editor preview, timeline chip, and fullscreen layout - Editor preview: render into a callback-ref target so it survives the asynchronous LayerControls portal mount and re-renders when switching layers; clear the loading state via a MutationObserver since HubSpot's onFormReady is not reliably delivered; drop the irrelevant AJAX-submission notice for HubSpot. - Timeline: show the HubSpot icon and name on the marker chip instead of the generic form icon and "Gravity Forms". - Frontend: lay the HubSpot form out at a centred width in fullscreen so its iframe no longer collapses in the fit-content form container. * feat(hubspot): connect HubSpot forms through GoDAM Central Add a GoDAM Central connection for HubSpot forms alongside the existing HubSpot plugin (leadin) path, and let the admin choose the source on the Settings > Integrations > HubSpot tab. - Extract a shared Central_Client trait for the server to server GoDAM Central calls, used by both the Marketo and HubSpot integrations. - Add a Hubspot config class that reads the cached map block, resolves the active source (central or leadin) from the admin choice and whether it is connected, and gates rendering. When the HubSpot plugin is not active, Central is the only method. - Add hubspot status and forms REST routes that proxy GoDAM Central, and make the editor form list route source aware. - Render Central HubSpot forms with HubSpot forms v2 on the frontend (no shortcode); the leadin source keeps its own shortcode. - Add the HubSpot settings tab with connection method cards, the Connect on GoDAM flow with polling, and the leadin status. - Disable adding and show a clear message on existing HubSpot layers when the integration is turned off, and do not render the layer on the frontend. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(marketo): keep the viewer on the video after a submit, and address review Resolve the review on #2218. - Must fix: register a forms2 onSuccess handler that shows a thank-you in place of the form and returns false, so a submit no longer follows Marketo's follow-up redirect (which took the viewer off the video / reloaded it). The player sees `.godam-marketo-success` and shows Continue, and the submitted analytics event fires. - Should fix: render each layer's form node with a unique id plus `data-marketo-form-id`, and load same-id forms one at a time, so the same Marketo form on two layers (or a video embedded twice) no longer renders its fields twice. - Drop the local podId / munchkinId / recaptchaKey settings that nothing reads since Central became the single source of truth, and fix the comments and the class header that still described local fields as a source or fallback. - Deep-link the editor's "not connected" notice straight to the Marketo tab. - Use the `n.e.x.t` @SInCE placeholder in the new classes instead of 2.5.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(hubspot): address review on the Central form layer Resolve the review on #2237. - Should fix: after "Connect on GoDAM", refresh the cached licence response in get_status when Central's live portal differs from the cache, so the editor, the form picker and the player see the new connection right away instead of after the hourly refresh. - Should fix: detect a submit on an iframe-rendered HubSpot form. Mark the container from the forms v2 onFormSubmitted callback and add `.godam-hubspot-submitted` to the FormLayerManager confirmation selectors, so the player shows Continue and sends the submitted event even though the success node lives inside the form's iframe. - Validate the hubspot_id shape in the player branch (a form GUID or a numeric id), so a value containing `]` cannot close the [hubspot] shortcode early. - Settings tab: poll get_status silently so a background re-check no longer blanks the panel, and re-check on window focus so connecting after the polling window still updates without a reload. Add a Contact support link to the error notice and fix "hubSpot" to "HubSpot". - Editor copy now uses the chosen source (not the active source, which is empty when nothing is connected), so the "how to connect" notice and the add-layer tooltip tell the admin what actually unblocks the layer. Deep-link to the HubSpot tab. - Drop the unused GET /godam/v1/hubspot/forms route; the editor uses /hubspot-forms. Use the n.e.x.t @SInCE placeholder in the new files. - Also fix the integration sub-tabs bottom border, which targeted a wrapper class that is not rendered. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(marketo): cover the Central config reader and the call_central client Add PHPUnit coverage requested in the review of #2218: - MarketoConfigTest: Marketo::get_instance_host() across the hosts it accepts (bare host, scheme + path, bare id, Munchkin fallback, empty), is_configured() and is_central_connected(), driven by a stubbed rtgodam_user_data option. - MarketoCentralClientTest: the error mapping in call_central() -- no licence key, an error body (message + error_type), a success that unwraps Frappe's envelope, and a transport failure. Runs in a separate process so its HTTP / site-url stubs do not collide with the resilience test's globals. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(hubspot): cover source resolution and the settings whitelist Add PHPUnit coverage requested in the review of #2237: - HubspotConfigTest: Hubspot::get_active_source() across the cases (Central chosen and connected or not, leadin chosen and active/connected, the leadin choice collapsing to Central when the plugin is inactive), the effective portal and region, is_configured()/is_enabled(), and the sanitize_integration_settings whitelist (valid source kept, unknown source and keys dropped, enable coerced). - Load the Central_Client trait in MarketoCentralClientTest when present, since Marketo_Integration takes call_central from it on this branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(marketo): keep loading forms when one cannot be returned forms2 calls loadForm's callback with null when Marketo cannot return a form -- an unknown, deleted or unapproved form ID, or a subscription mismatch. `form.onSuccess` then threw, so the two statements after it never ran: the node kept the borrowed `mktoForm_<id>` id and `loadNext` was never called, leaving every Marketo form after it on the page empty, including layers on other videos. Guard the callback so the id is restored and the queue continues either way; only the success handler is skipped for a form that failed to load. Also build the confirmation message as a text node. It was interpolated into an HTML string, so a translated `successText` containing `<` or `&` was parsed as markup. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(hubspot): address review — Yoda check, arrow alignment, support link - Yoda condition in Hubspot_Integration::get_status (clears the PHPCS error and the rtBot "Changes requested" gate) - realign the HubSpot videoData block's => to the longer hubspotChosenSource key (diff lines only; older rows left untouched, as requested in review) - add a Contact support link to the "Could not reach" warning on the settings tab Pre-commit hook bypassed: full-file PHPCS flags pre-existing arrow alignment on unchanged rows (not in the diff, so CI ignores them), and lint:js OOMs across files; the changed files pass phpcs/eslint individually. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * style(marketo): align the videoData array arrows flagged by PHPCS Add one space before => on the five rows rtBot flagged (everestFormsActive, ninjaFormsActive, metformActive, marketoActive, marketoConfig) so they line up with the array's longest key. Only the rows in this PR's diff are touched; older untouched rows are left as-is. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * feat(tracking): send video view milestones to Marketo and HubSpot (#2226) * feat(tracking): send video view milestones to Marketo and HubSpot When a visitor the customer's marketing automation platform already knows watches a GoDAM video, that tool should record how far they got. This adds the WordPress half of that path (slice S4). A new footer script watches every player, works out the highest milestone reached (0 = started, then 25/50/75/100) from the played ranges rather than the playhead, and posts it with the visitor's `_mkto_trk` and/or `hubspotutk` cookie to a new public route, `godam/v1/map-events`. The route validates the shape to the same rules godam-core applies, then schedules a server-to-server forward with the licence key in `X-Api-Key`, following the existing `log_media_view` pattern — so no Marketo or HubSpot credential lives on the site, and the GoDAM licence key never reaches the browser. Which tools are connected comes from the `map` block of the `verify_api_key` response, which the plugin already caches hourly, so there is no extra call to Central. With tracking off, no tool ready, or no marketing cookie on the page, nothing is enqueued and no request is made. The route is public because most viewers are logged out and page caching rules out a usable nonce. It is rate-limited per IP, de-duplicated per view, and answers `{"status": "ok"}` to everything it accepts and drops alike, so a prober learns nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(tracking): count only what was played when a video ends On `ended` the tracker sent every milestone, so a viewer who played one second and skipped to the end was reported as having watched 25, 50, 75 and 100%. It now measures the played ranges, as `timeupdate` does, and counts a range that stops within a second of the end as reaching it, for the gap `timeupdate` leaves there. Only that missing tail is credited, so a viewer who skipped to the end gains nothing from the slack. Tests drive a fake player through godamPlayerReady: a skip to the end posts [0], a full watch stopping 0.3 s short posts all five, and 60% followed by a skip posts [0,25,50]. Addresses review: #2226 (comment) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(tracking): delete a forward's Action Scheduler row once it finishes The row's arguments hold the visitor's _mkto_trk / hubspotutk cookie. Action Scheduler keeps a completed row for 31 days, never purges a failed one, and shows the arguments under Tools > Scheduled Actions, while the class docblock said the cookie is never stored. delete_finished_forward() deletes the row on completed_action, failed_execution and failed_action, at priority 20 so it runs after Action Scheduler's logger and the delete clears that log line too. Every other action is left alone, and a row already deleted is not an error. The docblock now says where the cookie is written down and for how long. Addresses review: #2226 (comment) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(tracking): delete a forward's row after a PHP fatal too A fatal during the forward (out of memory, or another plugin's HTTP filter fataling) skips completed_action, failed_execution and failed_action. Action Scheduler's FatalErrorMonitor marks the row failed at shutdown and fires only action_scheduler_unexpected_shutdown, and failed rows are never purged, so that row kept the visitor's cookie for good. delete_finished_forward() now also runs on that hook, at the same priority 20, after the logger. The store is still usable at that point: Action Scheduler itself calls mark_failure() and release_claim() there. Addresses review: #2226 (comment) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(tracking): cover the map-events route and the forward's retries MapEventsTrackTest drives Map_Events::track() with a cached map block: only each connected tool's cookie is forwarded, nothing is queued while tracking is off or for a request of the wrong shape, each (media, session, milestone) is queued once, one IP is rate-limited at RATE_LIMIT, and every outcome answers {"status": "ok"}. MapTrackerRetryTest drives async_map_event() and maybe_retry(): the forward carries the licence key and the event, a network error, 429 or 5xx is retried with 1/2/4/8-minute back-off, a 2xx or 4xx is not, and nothing follows the last attempt. Addresses review: #2226 (review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(tracking): read the visitor cookie at send time, not at setup trackPlayer() read _mkto_trk/hubspotutk once while setting a player up and returned for good when neither was there. Both tracking scripts are third-party and async, so on a visitor's first page view the cookie is usually written after the player is ready: the tracker script was in place ~600ms into a load on preprod, while HubSpot's cookie landed ~1.2s after its own tag, two hops to another origin. The whole first view was dropped, which is the view that matters most - someone arriving from an ad on a landing page. Every later visit worked, since the cookie then already existed, so this only ever showed up as "the first one never arrives". report() now reads the cookie itself and keeps it once found, so a known visitor still costs one read per view. A milestone that cannot be sent is not added to `sent`, and both handlers already re-report every milestone passed, so a cookie arriving mid-view carries the whole view rather than the remainder. The session ID is minted on the first send instead of during setup. Without that, moving the read would have started writing a sessionStorage key for every anonymous viewer - the early return used to be what prevented it. Verified on preprod against a real player: with the page left to settle for 5s with no cookie, nothing is sent and no session key is written; setting the cookie and then playing posts 0/25/50/75/100 in five requests under one session ID. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(tracking): align HubSpot view tracking to Central's portal and honour opt-outs View milestones go through Central's HubSpot connection, so a milestone can only land on a contact when the visitor's hubspotutk was written by tracking code for Central's portal. Three gaps made HubSpot show "Unknown Contact": - A leadin connection to a different portal writes the cookie for its own portal. Drop HubSpot from the tracked providers on a portal mismatch (Marketo is unaffected), and skip enqueuing when nothing is left to track. - A Central-only site has no HubSpot tracking code at all, so no hubspotutk cookie is ever written. Inject HubSpot's analytics loader for Central's portal when a connected leadin is not already loading it; filterable via rtgodam_map_inject_hubspot_tracking_code. - The tracker read the cookie regardless of consent. Honour Global Privacy Control (suppresses every tool) and HubSpot's own __hs_opt_out / __hs_do_not_track (suppresses HubSpot) before collecting any visitor ID. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(hubspot): render Central forms via HubSpot's new per-portal embed A new-generation HubSpot form rendered through the legacy forms v2 library (`hbspt.forms.create()`) loads with its script loader disabled, so no tracking code runs: the `hubspotutk` cookie is never set, the submission is anonymous, and every forwarded view milestone arrives as "Unknown Contact". Switch the Central source to HubSpot's current embed instead — a single per-portal `/forms/embed/<portal>.js` loader plus a `.hs-form-frame` element. That embed loads HubSpot's tracking code itself, so it writes the cookie and links both the form submission and later video-view milestones to the contact. - Hubspot::central_forms_embed_src(): the new per-portal embed URL. - Hubspot_Form_Assets: enqueue the embed in place of forms v2.js. - hubspot-form.js: drop the hbspt.forms.create loader; it is now just a submit bridge that marks the layer on `hs-form-event:on-submission:success` (and the legacy `hsFormCallback` message) for FormLayerManager's confirmation check. - player template: render the `.hs-form-frame` embed markup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(tracking): stop map events for a provider disabled in settings Central's `map` block lists every tool connected on Central, but the site can switch Marketo or HubSpot off independently in Settings → Integrations. That local switch was ignored for view tracking: milestones kept being sent (and the HubSpot tracking code kept being injected) for a provider the admin had turned off. Honour the switch at the single chokepoint the whole feature funnels through, Map_Tracker::frontend_providers(): drop Marketo when !Marketo::is_enabled() and HubSpot when !Hubspot::is_enabled() (on top of the existing portal-alignment drop). maybe_enqueue_script() already bails when the list is empty, so with both off nothing is enqueued and no event is sent. - Marketo::is_enabled(): new, mirroring Hubspot::is_enabled(); is_configured() now builds on it. - MapTrackerProvidersTest: cover Marketo-off, HubSpot-off and both-off; load the Marketo class in the bootstrap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(tracking): gate the map-events route on frontend_providers; correct comments Addresses PR #2226 re-review (subodhr258). Should-fix: the map-events REST route filtered the forwarded cookies against Central's raw `providers`, not Map_Tracker::frontend_providers(). A full-page- cached page keeps the old inline `godamMapTracking` and script after an admin switches a tool off, so it kept POSTing that tool's cookie and the route forwarded it; a direct POST did the same. Route the cookie-name filter through frontend_providers() so a disabled provider — and a HubSpot portal mismatch — is dropped server-side too. Also reword the embed comments that overclaimed: HubSpot's per-portal forms/embed/<portal>.js renders the form (in a same-origin srcdoc iframe) and fires the V4 submit event, but it does not load the tracking code or set the `hubspotutk` cookie. That cookie comes from the tracking code the plugin injects separately for a Central-only site (maybe_enqueue_hubspot_tracking_code), which is what links a submission (and view milestones) to a contact. - class-map-events.php: cookie_names_for_connected_providers() via frontend_providers(). - MapEventsTrackTest: a disabled provider's cookie is not forwarded; both off forwards nothing. connect() now sets a Central HubSpot portal so alignment holds. - bootstrap: load the HubSpot class for the route's provider filter. - class-hubspot.php, class-hubspot-form-assets.php, hubspot-form.js, template: accurate comments on what the embed does vs. what sets the cookie. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: disclose the HubSpot embed and tracking code in External Services Per PR #2226 re-review: the plugin loads HubSpot's own scripts on the frontend (the forms embed to render a Central HubSpot form, and the tracking code to set the `hubspotutk` cookie for view tracking), and the tracking code pulls in HubSpot's wider suite for the portal. Document what loads, when, and the `rtgodam_map_inject_hubspot_tracking_code` off switch, in both readme.txt and README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(hubspot): render Central forms with forms v2 to support legacy + new editors The per-portal V4 embed (423da58) has no legacy path, so a Central layer using a legacy-editor form rendered blank. Central lists both editors' forms (`{id,name}`, no type), so the renderer has to handle either. Go back to HubSpot's forms v2 library, which renders a legacy-editor form itself and switches a new-editor form to the V4 embed. Keep the V4 submit listener from 423da58: the bridge now marks the layer on both the legacy `onFormSubmitted` callback and the new-editor `hs-form-event:on-submission:success` window event, so the player's confirmation works for either form type. (This is the fix the first re-review suggested: v2 for rendering + the hs-form-event listener.) The `hubspotutk` cookie that links a submission to a contact is unchanged — it comes from the tracking code injected by Map_Tracker (896073f), not the form library. - class-hubspot-form-assets.php: enqueue forms/v2.js again. - hubspot-form.js: hbspt.forms.create() render loop + onFormSubmitted, plus the global hs-form-event listener for V4 forms. - template: the v2 render container (.hubspot-form with data attributes). - class-hubspot.php / HubspotConfigTest: drop the now-dead central_forms_embed_src(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(hubspot): note the injected tracking code on the HubSpot settings tab Per PR #2226 re-review: admins see the settings tab, not the readme. Under the GoDAM Central connection, add a line that with video-view tracking on, GoDAM adds HubSpot's tracking code to pages with a video so views match a contact — and that the code also loads whatever the portal has set up (chat, pop-ups, ads pixel, cookie banner). Complements the readme External Services entry (8555d66). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * [Develop] Fix 13 Dependabot alerts and 4 Garuda findings: DOMPurify 3.4.17, notice dismissals, SureForms recorder upload (#2255) * Bump DOMPurify, follow-redirects and dev tools for Dependabot security alerts * Check the capability on notice dismissals, and take only audio or video from the SureForms recorder field Fixes Garuda findings 21-10-2026 #9, #10, #11 and #18 (and L10, L30, L31). * Bump qs to 6.16.1 for Dependabot alert 396 The qs override moves from 6.16.0 to 6.16.1, the release that fixes GHSA-6pq8-jhm2-2vcw (qs.stringify with arrayFormat 'comma' throws on elements without a callable toString). qs is only used by express inside the webpack dev server, so the built plugin files do not change. * fix(blocks): keep GoDAM media blocks robust in flex & narrow containers (#2234) * fix(pdf-block): fill container width so flex layouts don't collapse The Document block root (.wp-block-godam-pdf) declared no width, so when placed inside a core Group using a Row or Stack (flex) layout it became a flex item with the default `flex: 0 1 auto` and collapsed to its min-content width while .godam-pdf-wrapper's fixed pixel height stayed — rendering a tall, narrow, empty box. Setting width: 100% keeps flex parents consistent with the flow/grid/columns layouts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(pdf-block): make card view respond to container width, not viewport The card view stacked (cover on top) only at a <=480px viewport via a media query, so a card placed in a narrow column or grid cell on a wide screen kept the side-by-side layout and truncated its title. Make .godam-pdf-card-wrapper a size-query container (container-type: inline-size) and switch the stacking rule to @container, so the card adapts to the width its parent gives it regardless of viewport size. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(pdf-block): mirror card container-query stacking in the block editor The editor renders the card view from its own markup (.godam-pdf-preview--card) and editor.scss, which never stacked the card and keyed its few responsive tweaks off the viewport. Make .godam-pdf-preview--card a size-query container and move its responsive rules into a single @container stack block (cover on top, full width, full title), so the editor preview matches the front end and adapts to the width the block's parent gives it. Also show the full title when the front-end card stacks, for parity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * style(pdf-block): lower card stack breakpoint to 400px container width Keep the cover beside the text a little longer before stacking, in both the front-end and editor container queries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(audio,video-thumbnail): fill container width so flex layouts don't collapse Same issue fixed for the Document block: the Audio and Video Thumbnail block roots declared no width, so inside a core Group using a Row/Stack (flex) layout they became flex items with the default `flex: 0 1 auto` and collapsed to their min-content width (the audio player shrank to ~50px). Set width: 100% so flex parents match the flow/grid/columns layouts. Image (intrinsic <img>) and Video Duration (inline <time>) are unaffected; Video and Gallery already handle flex. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(blocks): fill width only in flex parents, and keep floats out of the card query A root `width: 100%` on the PDF, Audio and Video Thumbnail blocks also applied outside Row/Stack groups, where it broke settings that work on develop: Align: Full width stopped short of the right edge by twice the root padding, a side margin pushed the block past its column, and a left- or right-aligned card spanned the content area instead of floating. The width is now set only under `:where(.is-layout-flex) >`, where the collapse happens; flow, constrained and grid parents already stretch the block. The card's size-query container skips `.alignleft` and `.alignright`, on the front end and in the editor, because inline-size containment would size a shrink-to-fit float to zero. Addresses review: #2234 (comment) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(pdf-block): still stack a floated card on phones The card's size-query container now skips Align left/right, so a floated card had no stacking rule left: the 480px media query it used on develop had been replaced by the container query. Floated cards fall back to that media query again, on the front end and in the editor. The stacked layout moves into a godam-pdf-card-stacked mixin in each file, shared by the container query and the fallback, so the two cannot drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> * Bump version to 2.6.0 and add the v2.6.0 changelog (#2274) * Bump version to 2.6.0 and add the v2.6.0 changelog - Add the v2.6.0 entry to CHANGELOG.md and readme.txt (Marketo and HubSpot form layers, Marketo/HubSpot video-view tracking, the block flex-layout fix, and security fixes), and drop v2.5.0 from readme.txt. - Update the Stable tag in readme.txt and README.md to 2.6.0. - Bump the version in the godam.php header and RTGODAM_VERSION. - Bump the version in package.json and package-lock.json. - Resolve the @SInCE n.e.x.t markers in the Marketo/HubSpot code to 2.6.0. - Regenerate languages/godam.pot (now includes the Marketo/HubSpot strings). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add the Marketo entry to the readme External Services section WordPress.org requires every third-party service to be listed. The Marketo form layer loads Marketo's forms2 library from the account's instance host to render the form and submit entries to Marketo, so add a === Marketo === block beside the HubSpot one, noting that video-view tracking goes through GoDAM Central rather than a client-side script. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Set the v2.6.0 changelog date to October 30, 2026 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> * Marketo form layer: pick the form from a list, and handle forms that can't load (#2276) * fix(marketo): let viewers continue past a form that cannot load, warn on HTTP pages A Marketo form ID from another instance, or one Marketo cannot return, rendered an empty layer; with "Allow skip" off the viewer was stuck. marketo-form.js now replaces it with "This form could not be loaded." and FormLayerManager shows Continue without recording a submission. The editor preview shows its error instead of an empty white box. On HTTP pages forms2 asks for its XDFrame proxy over http://, the browser upgrades it to HTTPS and forms2 drops every reply, so submits hang on "Please Wait". The frontend now logs a console warning and the editor shows a notice (app-*.marketo.com hosts are unaffected). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(marketo): pick the form layer's Marketo form from a list When the Marketo connection on GoDAM Central has a Client ID and Secret, the Marketo form layer now shows the same "Select Form" picker as HubSpot, listing the instance's approved forms. A forms-only connection, or Central failing to list forms, keeps the typed Form ID field, with a hint that adding the API credentials turns on the list. A saved form no longer in the list still shows as "Form <id>". GET godam/v1/marketo/forms (unused until now) needs upload_files like the other form-list routes, returns the editor's [{ id, title }] shape, answers an empty list instead of an error, and skips Central when Marketo is not configured. The connection routes stay admin-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(marketo): stop waiting on a Marketo form that never loads forms2 never calls the loadForm callback when its request fails (blocked by an ad or privacy blocker, or a network drop), so the layer stayed empty and the Marketo forms after it on the page never loaded. Each form now gets a 12-second guard, matching the editor preview: on timeout it shows "This form could not be loaded." and moves on to the next form. When forms2.min.js itself never loads, waitForMktoForms2 now marks every Marketo layer the same way before giving up, so viewers can continue past them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * MAP tracking: per-site switch to stop sending video views to Marketo or HubSpot (#2277) * feat(map): per-site switch to stop tracking video views to Marketo or HubSpot Tracking was only switchable on GoDAM Central, for every site on the licence at once. Each tool's integration tab now has "Track video views on this site" (integrations.<tool>.track_views, on by default so nothing changes on upgrade), next to Central's own tracking state. Central queues a view for Marketo only with the visitor's mkto_trk cookie and for HubSpot only with hubspotutk, so turning the switch off stops this site sending that cookie: GoDAM Central's setting and other sites are not changed, Central's switch stays the master, and form layers are unaffected. Enforced in Map_Tracker::frontend_providers() (the player tracker, the HubSpot tracking code injection and the map-events route), and again at send time so views queued before the switch was turned off are not sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(map): load Marketo's Munchkin so Marketo views can be tracked Marketo view tracking needs the visitor's _mkto_trk cookie, and only Munchkin sets it: forms2 (the Marketo form layer) only reads it. The plugin never loaded Munchkin, so on a site without its own Munchkin code no visitor had the cookie, every map-events payload carried only hubspotutk, and a Marketo form fill was not tied to the visitor. When Marketo is a frontend provider for the page (so Central and this site both track it), Map_Tracker now adds an inline loader for https://munchkin.marketo.net/munchkin.js that calls Munchkin.init() with the connection's Munchkin ID. It does nothing when Munchkin is already on the page or the browser sends Global Privacy Control, and a site that loads Munchkin itself can turn it off with the rtgodam_map_inject_munchkin filter. This mirrors the existing HubSpot tracking code injection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(map): say on the Marketo tab that GoDAM loads Munchkin, add changelog lines Sites with Marketo tracking on will start loading Munchkin on video pages after this update. The Marketo tab now says so under the site tracking switch, like the HubSpot tab does for HubSpot's tracking code: it is added to pages with a video, it also records page visits in Marketo, and the rtgodam_map_inject_munchkin filter turns it off. The v2.6.0 changelog (CHANGELOG.md and readme.txt) gains lines for the per-site tracking switch and for Munchkin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(map): mint the view session ID from crypto only, align the editor data array (#2278) CodeQL (js/insecure-randomness) flagged getSessionId() in map-tracking.js: when crypto.randomUUID() is missing (it needs a secure context, so any plain-HTTP page), the ID fell back to Date.now() plus Math.random(). The ID only groups one view's milestones for de-duplication and grants no access, but the fallback now uses crypto.getRandomValues() (16 bytes as 32 hex characters), which HTTP pages have too. With no crypto API at all the tracker sends nothing rather than a predictable ID. Also realigns the double arrows of the video editor's localized data array in class-pages.php (whitespace only), which rtBot's phpcs review flagged on the v2.6.0 sync PR. Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Subodh Rajpopat <subodh.rajpopat@rtcamp.com> Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes 15 of the 17 open Dependabot alerts on the GoDAM plugin (1 critical, 5 high), by pinning patched versions in the
overridesblock ofpackage.json, and fixes 4 Medium Garuda code findings (plus 3 Lows with the same root cause) in 2 fixes. One PR intodevelop(the [Main] partner #2256 was closed on 28 Oct: develop reaches main at the release). The alerts close when develop reachesmainat the next plugin release.Updated 29 Oct: a third commit bumps
qs6.16.0 to 6.16.1 for the new alert 396 (medium, development only). The 3 DOMPurify alerts (386, 387, 388) were marked fixed on 28 Oct when GoDAM 2.5.1 reachedmain, so this PR now covers 13 of the 16 alerts open on main; the other 3 (extract-zip 299 and 319, deepmerge 397) have no fixed release.Dependabot alerts
Garuda code findings (2 fixes)
Under the runbook's Garuda limit (at most 5 fixes per run, Medium and up, no Lows on their own), this PR fixes the 2 real Medium root causes whose fix only touches the cited code. Scans: https://github.com/rtCamp/garuda-alpha-testing-security-findings/tree/main/godam
Fix 1: the three notice-dismiss AJAX handlers check the capability, not only the nonce. Adds Garuda's suggested
current_user_can( 'manage_options' )check (403 JSON error) todismiss_free_plan_notice,dismiss_woo_promo_noticeanddismiss_offer_banner. Closes:Fix 2: the SureForms recorder upload takes only the recorder field's own key, and only audio or video. The key must have the shape the recorder block prints (
godam-upload-<block id>-lbl-<label>-input-recorder<index>, block id may be empty) instead of any key containing-input-recorder, andwp_handle_upload()getsmimes(the site's allowed types narrowed to audio and video) andtest_type => true, so the type is checked against the file, not the browser's claim. Closes:*-input-recorderkey, unauthenticatedThe MIME list is a small static method on the SureForms class on purpose: #2251 adds a shared
rtgodam_get_recorder_upload_mimes()for Fluent Forms and Ninja Forms, and adding the same function here would clash when both merge. Once both are in, the SureForms class can switch to the shared helper.Not in this PR (sent to Subodh as a decision in the Slack thread): player SDK origin checks (#15, L29, #25), the account token in front-end page data (#12), the MetForm route (09-10 #22), three findings that code reading says are not real (#1, #6, #16), and the other Lows.
Follow-up worth considering: the free-plan, Woo promo and offer notices are still shown to non-admins; with this fix their Dismiss no longer sticks for them. Hiding those notices from users who cannot dismiss them is a visible change, so it is left out here.
What changes in shipped code
Dependabot part: one runtime change, DOMPurify 3.4.16 to 3.4.17. It lands in the 12 bundles that already include DOMPurify (
pages/godam,pages/analytics,pages/video-editor,js/godam-player-frontend,blocks/godam-player,js/media-library,js/godam-gallery,js/gf-godam-recorder-editor, the four LifterLMS bundles), each +970 bytes, plus their.asset.phphashes and the DOMPurify version line in 3LICENSE.txtfiles. No other file inassets/buildchanges (Develop: compared all build files before and after).Garuda part: the PHP changes above (3 AJAX handlers, the SureForms recorder upload). No build file changes.
follow-redirects is marked runtime because axios depends on it, but it is only used by axios on Node; no browser bundle changes because of it. The other packages are development tools only.
How it was verified
.nvmrc):npm ciandnpm run build:prodexit 0 before and after; every resolved copy listed afterwards: dompurify 3.4.17, fast-uri 3.1.9, follow-redirects 1.16.1, launch-editor 2.14.2, markdown-it 14.3.3, serialize-javascript 7.1.3 (one copy each).npm run test:unit: same result before and after on both branches (main 690 passed, develop 688 passed).NoticeDismissCapabilityTest,SureFormsRecorderUploadTest). With the fix all pass; with only the source change reverted, 22 of the first 30 fail (subscriber, contributor, author and editor dismissals saved; non-recorder keys and non-media types accepted). Full PHP suite: main 945 tests (21 errors), develop 662 (8 errors); the same errors appear on the base without this change (PHP 8.5 deprecations in older tests). PHPCS clean on the changed files.npm ci --ignore-scripts,npm run build:prodandnpm run test:unitbefore and after: exit 0, 688/688 tests both times, 330/330 files inassets/buildbyte-identical.npm ls qs --all: every copy is 6.16.1 (express and body-parser inside the webpack dev server). qs 6.16.1 was published 14 Oct; its resolved URL is registry.npmjs.org; it has no install script.launch-editor@<2.14.1) that npm 10 does not re-apply to an already locked copy, so it is now an unscoped pin.Suspected side effects
qs 6.16.0 to 6.16.1 (29 Oct): used only by express inside the webpack dev server (
npm start); nothing in the repo imports it. Release notes: parse and stringify fixes and hardening, nothing marked breaking. No shipped file changes.DOMPurify 3.4.17 release notes: fixes in
IN_PLACEmode,SAFE_FOR_TEMPLATESwith shadow roots, the SMILattributeNameguard in XHTML mode, and small hardening. Nothing marked breaking. GoDAM callsDOMPurify.sanitizein string mode (noIN_PLACE), in the player settings menu, share modal, video editor layers, media library details and the recorder fields.Features to exercise: admin pages, block editor with a GoDAM video block, front-end player (play, settings menu).
Smoke test
Throwaway WordPress Playground (PHP 8.3, latest WordPress, WooCommerce 11.2.1, GoDAM for Woo from the same base) with
WP_DEBUG_LOGon, base build vs this branch's build, for both main and develop. Checked with headless Chrome: wp-admin, every GoDAM admin page (GoDAM, Video Editor, Analytics, Settings, Reel Pops, Help), media library, block editor with a GoDAM video block inserted and saved, a WooCommerce product edit screen, and as a logged-out visitor the video post (player loads, plays, settings menu opens), a product page and the home page.Results identical before and after: every page HTTP 200, no new browser console errors, no PHP warnings or fatals. One PHP notice ("godam-player-style" enqueued with an unregistered dependency) appears in the block editor in all four runs, before and after.
Garuda fixes, same Playground, base vs this branch (main and develop):
godam-upload-a1b2c3d4-lbl-…-input-recorder1, andgodam-upload--lbl-…with no block id) match. Real anonymous multipart uploads through the handler: an MP4 recording is stored on both; a PDF under the recorder key is stored by the base and refused by this branch; an MP4 under another*-input-recorderkey is stored by the base and ignored by this branch.29 Oct, qs commit: a new throwaway Playground (PHP 8.3, WordPress latest), GoDAM built from the previous head 073cd37 versus this head,
WP_DEBUG_LOGon: wp-admin, all 5 GoDAM admin pages, Plugins, media library, block editor with a GoDAM video block (valid, saved without error), the video post as administrator and as a logged-out visitor (player loads and plays), and the home page. Every page 200 on both, no console errors, the same one "godam-player-style" notice on both. qs is a dev-server package only (the built plugin files are byte-identical). Site deleted after the run.Smoke test: passed
Reviewer check: passed
Manual QA
Runtime changes: DOMPurify and the two Garuda fixes.
Garuda fixes:
Development-only bumps: no runtime impact, QA can skip.
Left open