Free AD0-E704 Exam Braindumps (page: 9)

Page 8 of 23

After enable the content security policy in a magento site, you see below warnings/errors in the browser console. "[Report Only] Refused to load the script 'https://cdn.jquery.com/jquery.js' because it violates the following Content Security Policy directive: "script-src assets.adobedtm.com".What could be the standard fix of this problem?

  1. Add etc/csp_whitelist.xml in a custom module and whitelist it under policy id="script-src"
  2. Add etc/csp_whitelist.xml in a custom module and whitelist it under policy id="link-src"
  3. Add etc/config.xml in a custom module and set report only to 1, to let the browser load all script urls without error.
  4. Disable the module Magento_Csp to let the browser load all script urls without error.

Answer(s): A



In a phtml, you added script tag and defined couple of js variables as below:Now to protect it from XSS attacks, which two methods allow you to keep the php variable output XSS-safe?Choose 2

  1. $block->escapeUrl($myUrl)
  2. $block->escapeJs($myName)
  3. $block->escapeHtmlAttr($myName)
  4. $block->escapeHtmlAttr($myUrl)

Answer(s): A,B



Magento uses the HTTPOnly flag when setting cookies for security reasons. There is also a system configuration setting available in the Cookie Settings to turn it on and off.
What is the purpose of this flag?

  1. To prevent cookies from being intercepted via a CSRF attack
  2. To prevent cookies from being accessible via JavaScript
  3. To prevent Cross Site Tracing (XST) attacks
  4. To prevent cookies from being delivered over HTTPS

Answer(s): B



You are integrating an external system from which products and categories will be synchronized with Magento.
To keep the category tree synchronized, an identifier attribute needs to be added to the catalog_category entity. The identifier value is generated by the external system as an unsigned 3 byte integer and is global in scope. Your code will run many concurrent queries to select categories based on this ID in order to synchronize changes.
Keeping performance in mind, what attribute backend type do you choose when creating the EAV attribute?

  1. int
  2. varchar
  3. static
  4. text

Answer(s): A






Post your Comments and Discuss Adobe AD0-E704 exam with other Community members:

AD0-E704 Discussions & Posts