Skip to content

Devdocs 16962 #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const WorkflowTriggerResult = ({ workflowInstanceUrl }) => {
<div className={styles.popupContainer}>
<img src={imgSuccess} alt="" />
<h2>{textContent.popups.workflowTriggered.title}</h2>
<p className={styles.popupMessageContainer} dangerouslySetInnerHTML={{ __html: textContent.popups.workflowTriggered.description }}></p>
<p className={styles.popupMessageContainer}>
See <a href='https://developers.docusign.com/docs/maestro-api/maestro101/embed-workflow/#embedded-workflow-instance-recommendations-and-restrictions' target='_blank'>Embedded workflow instance recommendations and restrictions</a>.
</p>
<a href={workflowInstanceUrl} target="_blank" rel="noreferrer" onClick={handleFinishTrigger}>
{textContent.buttons.continue}
</a>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/WorkflowList/WorkflowList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const WorkflowList = ({ items, interactionType, isLoading }) => {
<div className={`list-group ${styles.listGroup}`}>
<div className={styles.emptyListContainer}>
<h2>{textContent.workflowList.doNotHaveWorkflow}</h2>
<h4 className={styles.resetStyle} dangerouslySetInnerHTML={{ __html: textContent.workflowList.pleaseCreateWorkflow }}></h4>
<p>Please <a href=''>manually create a workflow</a> in your account before using the sample app.</p>
</div>
</div>
);
Expand Down
18 changes: 17 additions & 1 deletion client/src/pages/TriggerWorkflowForm/TriggerWorkflowForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,23 @@ const TriggerWorkflowForm = () => {
const type = searchParams.get('type');
const triggerUrl = searchParams.get('triggerUrl');

if (triggerUrl !== null) {
const triggerUrlPattern = /^https:\/\/(?!.*javascript)[^()]+$/i;

function isValidTriggerUrl(url) {
try {
const decoded = decodeURIComponent(url);
const parsedUrl = new URL(decoded);
// Only allow https and the exact hostname
return (
parsedUrl.protocol === 'https:' &&
parsedUrl.hostname === 'apps-d.docusign.com'
);
} catch {
return false;
}
}

if (triggerUrl !== null && isValidTriggerUrl(triggerUrl)) {
return (
<div className="page-box">
<Header />
Expand Down