Skip to content

Marketo Adobe Connect Integration - #370

Open
gbajaj91 wants to merge 111 commits into
devfrom
mkto-poc
Open

Marketo Adobe Connect Integration#370
gbajaj91 wants to merge 111 commits into
devfrom
mkto-poc

Conversation

@gbajaj91

@gbajaj91 gbajaj91 commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator

Describe your specific features or fixes and provide a preview link for the feature being incorporated

  1. Incorporated the experience for loading the Adobe connect via chrono box using metadata plugin.
  2. Added a new mcz handler block for loading the marketo form in hidden mode.
  3. Added a new anchor point to add a element with id.

Requires : Branch class-tf changes to be merged.

Note:
mktoTestFormConfig.js is a temp file which is being worked upon by rob leslie and would be removed most likely. please igonre it for your review.

Pending:
Associating externalEventID from events to mcz form. Requires updated files from rob leslie.
UTs

Resolves: MWPW-176011

Test URLs:

sample webinar page.
https://mkto-poc--events-milo--adobecom.aem.page/events/experience-makers-connect-poc/test-event-210725/2025-07-31?preview=1

To test the feature, please load up the branch locally and run it against your local ESP and ESL server.
For more information on how to set up ESL and ESP locally, please refer to: FE Dev Wiki

@gbajaj91
gbajaj91 requested a review from qiyundai July 30, 2025 07:23
@gbajaj91
gbajaj91 marked this pull request as ready for review July 30, 2025 07:24

@qiyundai qiyundai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM in general. Approved with some non-blocking comments

Comment thread events/blocks/adobe-connect/adobe-connect.js
'aria-label': 'Close overlay',
src: '/events/blocks/adobe-connect/asset/Cross.svg',
alt: 'Close overlay',
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's also add role and tabindex attribute for this.

Alternatively, you might consider actually wrapping this img in a button element. You may also consider moving the svg files to the icons folder and use getIcon to summon the icon into your button's inner html, but this works just fine.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread events/blocks/mcz-handler/mcz-handler.js Outdated
Comment thread events/blocks/mcz-handler/mcz-handler.js Outdated
Comment thread events/blocks/mcz-handler/mcz-handler.js Outdated
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (dev@707003a). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #370   +/-   ##
======================================
  Coverage       ?   69.00%           
======================================
  Files          ?       24           
  Lines          ?     5056           
  Branches       ?        0           
======================================
  Hits           ?     3489           
  Misses         ?     1567           
  Partials       ?        0           

☔ View full report in Codecov by Sentry.
📢 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.

}

if (isTargetEmpty(targetVal) || shouldOverwrite) {
targetObject[key] = sourceVal;

Check warning

Code scanning / CodeQL

Prototype-polluting function Medium

Properties are copied from
thisObject
to
targetObject
without guarding against prototype pollution.

Copilot Autofix

AI about 1 year ago

To fix the prototype pollution vulnerability, we need to prevent the function from copying dangerous property names such as __proto__ and constructor from thisObject to targetObject. The best way to do this is to add a check inside the loop over Object.keys(thisObject) that skips any key that is "__proto__" or "constructor". This should be done in the function crawlAndUpdateObject in file rs/360-KCI-804/images/mktoTestFormConfig.js, specifically in the loop starting at line 857. No new methods or imports are required; a simple conditional check will suffice.

Suggested changeset 1
rs/360-KCI-804/images/mktoTestFormConfig.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/rs/360-KCI-804/images/mktoTestFormConfig.js b/rs/360-KCI-804/images/mktoTestFormConfig.js
--- a/rs/360-KCI-804/images/mktoTestFormConfig.js
+++ b/rs/360-KCI-804/images/mktoTestFormConfig.js
@@ -855,6 +855,10 @@
     const isObjectLike = (value) => typeof value === 'object' && value !== null;
 
     for (const key of Object.keys(thisObject)) {
+      // Prevent prototype pollution
+      if (key === "__proto__" || key === "constructor") {
+        continue;
+      }
       if (!Object.prototype.hasOwnProperty.call(targetObject, key) && !addToTarget) {
         continue;
       }
EOF
@@ -855,6 +855,10 @@
const isObjectLike = (value) => typeof value === 'object' && value !== null;

for (const key of Object.keys(thisObject)) {
// Prevent prototype pollution
if (key === "__proto__" || key === "constructor") {
continue;
}
if (!Object.prototype.hasOwnProperty.call(targetObject, key) && !addToTarget) {
continue;
}
Copilot is powered by AI and may make mistakes. Always verify output.
el.setAttribute('data-mcz-dl-status', 'loading');

let mczId = null;
if (getMetadata('eventExternalId')) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Image

The column currently in the metadata sheet is called 'external-event-id'. Your code is looking for eventExternalId. Is this intended? Are you planning on using the existing column or adding a new column? Also, I think generally we don't have camelCase metadata.

@adobecom-git-stale-pr-bot

Copy link
Copy Markdown

No activity in 7 days. Will be labeled stale at 14 days. Auto-close is disabled this run. Add stale-ignore to exempt.

No activity in 14 days, labeled stale (removed automatically on new activity). Auto-close is disabled this run. Add stale-ignore to exempt.

No activity in 21 days, labeled autoclose-pending (removed automatically on new activity). Would normally close in 7 days, but auto-close is disabled this run. Add autoclose-ignore to exempt.

No activity in 28 days. Would normally close now, but auto-close is disabled this run. Add autoclose-ignore to exempt.


Rundeck job Git Stale PR Check (git-stale-pr-bot), execution 2739336, project global, run by casalino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose-pending Will be auto-closed soon stale No recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants