Skip to content

Commit b835996

Browse files
authored
Merge pull request #22 from docusign/DEVDOCS-16962
Devdocs 16962
2 parents 55cd8aa + 951ae8c commit b835996

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

client/src/components/Popups/WorkflowTriggerResult/WorkflowTriggerResult.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const WorkflowTriggerResult = ({ workflowInstanceUrl }) => {
2020
<div className={styles.popupContainer}>
2121
<img src={imgSuccess} alt="" />
2222
<h2>{textContent.popups.workflowTriggered.title}</h2>
23-
<p className={styles.popupMessageContainer} dangerouslySetInnerHTML={{ __html: textContent.popups.workflowTriggered.description }}></p>
23+
<p className={styles.popupMessageContainer}>
24+
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>.
25+
</p>
2426
<a href={workflowInstanceUrl} target="_blank" rel="noreferrer" onClick={handleFinishTrigger}>
2527
{textContent.buttons.continue}
2628
</a>

client/src/components/WorkflowList/WorkflowList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const WorkflowList = ({ items, interactionType, isLoading }) => {
2424
<div className={`list-group ${styles.listGroup}`}>
2525
<div className={styles.emptyListContainer}>
2626
<h2>{textContent.workflowList.doNotHaveWorkflow}</h2>
27-
<h4 className={styles.resetStyle} dangerouslySetInnerHTML={{ __html: textContent.workflowList.pleaseCreateWorkflow }}></h4>
27+
<p>Please <a href=''>manually create a workflow</a> in your account before using the sample app.</p>
2828
</div>
2929
</div>
3030
);

client/src/pages/TriggerWorkflowForm/TriggerWorkflowForm.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,23 @@ const TriggerWorkflowForm = () => {
1717
const type = searchParams.get('type');
1818
const triggerUrl = searchParams.get('triggerUrl');
1919

20-
if (triggerUrl !== null) {
20+
const triggerUrlPattern = /^https:\/\/(?!.*javascript)[^()]+$/i;
21+
22+
function isValidTriggerUrl(url) {
23+
try {
24+
const decoded = decodeURIComponent(url);
25+
const parsedUrl = new URL(decoded);
26+
// Only allow https and the exact hostname
27+
return (
28+
parsedUrl.protocol === 'https:' &&
29+
parsedUrl.hostname === 'apps-d.docusign.com'
30+
);
31+
} catch {
32+
return false;
33+
}
34+
}
35+
36+
if (triggerUrl !== null && isValidTriggerUrl(triggerUrl)) {
2137
return (
2238
<div className="page-box">
2339
<Header />

0 commit comments

Comments
 (0)