You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
## CHANGELOG
2
2
3
3
4
-
## v4.2.0 - future release
4
+
## v4.2.0
5
5
6
6
### Enchancements
7
7
- Allow custom params for 'loginGuestUser' and custom body for 'loginRegisteredUserB2C' function [#415](https://github.com/SalesforceCommerceCloud/commerce-sdk/pull/415)
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,12 @@
1
1
## CHANGELOG
2
2
3
+
4
+
## v4.2.0
5
+
6
+
### Enchancements
7
+
- Allow custom params for 'loginGuestUser' and custom body for 'loginRegisteredUserB2C' function [#415](https://github.com/SalesforceCommerceCloud/commerce-sdk/pull/415)
8
+
- Add helper to encode special SCAPI characters [#416](https://github.com/SalesforceCommerceCloud/commerce-sdk/pull/416)
Copy file name to clipboardExpand all lines: docs/index.html
+65-1Lines changed: 65 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,13 @@ <h3>Shopper Login (SLAS)</h3>
83
83
<p>SLAS will soon require new tenants to pass <code>channel_id</code> as an argument for retrieving guest access tokens. You can read more about the planned change <ahref="https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas.html#guest-tokens">here</a>.</p>
84
84
<p>Please be aware that existing tenants are on a temporary allow list and will see no immediate disruption to service. We do ask that all users seek to adhere to the <code>channel_id</code> requirement before the end of August to enhance your security posture before the holiday peak season.</p>
85
85
<p>In practice, we recommend that customers using the SLAS helper functions upgrade to <code>v4.0.0</code> of the <code>commerce-sdk</code>.</p>
<p>In the next major version release, the SDK will encode special characters (UTF-8 based on SCAPI guidelines) in path parameters by default. Please see the <ahref="#encoding-special-characters">Encoding special characters</a> section for more details.</p>
<p>The SDK currently single encodes special characters for query parameters in UTF-8 format based on SCAPI guidelines. However, the SDK does NOT encode path parameters, and will require the developer to encode any path parameters with special characters.</p>
392
+
<p>Additionally, SCAPI has special characters that should be double encoded, specifically <code>%</code> and <code>,</code>:</p>
393
+
<ul>
394
+
<li><code>%</code> should always be double encoded</li>
395
+
<li><code>,</code> should be double encoded when used as part of an ID/parameter string, and single encoded when used to differentiate items in a list </li>
396
+
</ul>
397
+
<p>There is a helper function called <code>encodeSCAPISpecialCharacters</code> that can be utilized to single encode the SCAPI special characters and no other special characters.</p>
398
+
<p>Here's an example where the <code>getCategory/getCategories</code> endpoints are called with a <code>categoryID</code> with special characters:</p>
<p>For more information about security considerations related to developing headless commerce applications, see
529
593
<ahref="https://developer.salesforce.com/docs/commerce/commerce-api/guide/security-considerations-for-headless-commerce.html">Security Considerations for Headless Commerce</a> on the
<p>If you discover any potential security issues, please report them to <ahref="mailto:security@salesforce.com">security@salesforce.com</a> as soon as possible.</p>
595
+
<p>If you discover any potential security issues, please report them to <ahref="mailto:security@salesforce.com">security@salesforce.com</a> as soon as possible.</p>
0 commit comments