<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use of eval() function in ESRI codebase in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341445#M9080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. This is still an issue for us. Has anyone experienced this on an external facing portal serving a WAB app?&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3931"&gt;Randall Williams&lt;/A&gt; Is the use of eval() a potential security issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the error that the Eval() ends up producing on the client when the app is served from our external server.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/460173_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a screenshot of Chrome Dev Tools showing the code that is being served to the client externally when init.js contains the eval() function.&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/460167_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what we see when served internally. And there is no error.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/460172_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Sep 2019 21:40:52 GMT</pubDate>
    <dc:creator>AndrewTerwiel</dc:creator>
    <dc:date>2019-09-22T21:40:52Z</dc:date>
    <item>
      <title>Use of eval() function in ESRI codebase</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341442#M9077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have just had a web app fail due to a syntax error that was caused by the returned value of the eval() function. See&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval"&gt; this document&lt;/A&gt; for reasons not to use eval(). I've replaced this function with JSON.parse() and this has gotten our web app running again. Can anyone tell me why ESRI is using eval() in their code when it is known to cause problems?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2018 02:27:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341442#M9077</guid>
      <dc:creator>AndrewTerwiel</dc:creator>
      <dc:date>2018-11-13T02:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use of eval() function in ESRI codebase</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341443#M9078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have not seen esri use the eval() function in their code. Can you provide a location where you see them using it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2018 13:53:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341443#M9078</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-11-13T13:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use of eval() function in ESRI codebase</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341444#M9079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They have used it in &lt;STRONG&gt;init.js&lt;/STRONG&gt; located in the root of a web app that we created with Web AppBuilder from our on-premise Enterprise Portal 10.5. There is a &lt;STRONG&gt;setLocale()&lt;/STRONG&gt; function at line 208, then at line 217 within this function they have this:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; userObj &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;eval&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'('&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;unescape&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;allCookies&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esri_auth&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;')'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2018 20:17:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341444#M9079</guid>
      <dc:creator>AndrewTerwiel</dc:creator>
      <dc:date>2018-11-13T20:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use of eval() function in ESRI codebase</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341445#M9080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. This is still an issue for us. Has anyone experienced this on an external facing portal serving a WAB app?&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3931"&gt;Randall Williams&lt;/A&gt; Is the use of eval() a potential security issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the error that the Eval() ends up producing on the client when the app is served from our external server.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/460173_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a screenshot of Chrome Dev Tools showing the code that is being served to the client externally when init.js contains the eval() function.&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/460167_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what we see when served internally. And there is no error.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/460172_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Sep 2019 21:40:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341445#M9080</guid>
      <dc:creator>AndrewTerwiel</dc:creator>
      <dc:date>2019-09-22T21:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use of eval() function in ESRI codebase</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341446#M9081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is related to:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN class=""&gt;[#BUG-000121479 Web AppBuilder Apps Require 'unsafe-inline' and 'unsafe-eval' in ContentSecurityPolicy Header]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are issues in both the WAB and in JS API 3.x that result in breaking changes when we prevent unsafe-eval. These issues are caused in part by upstream dependencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding is that this is addressed in the next version of the WAB (The "Experienec Builder") which shoud be out later this year.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2019 19:19:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/use-of-eval-function-in-esri-codebase/m-p/341446#M9081</guid>
      <dc:creator>RandallWilliams</dc:creator>
      <dc:date>2019-09-23T19:19:16Z</dc:date>
    </item>
  </channel>
</rss>

