<?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: Is ' where 1=1' is safe in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137383#M76099</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/554384"&gt;@文瑞蘇&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;How can I proof that This usage is safe for ArcGIS server rest service?&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Apparently these types of expressions are common in SQL injection attacks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.ptsecurity.com/ww-en/analytics/knowledge-base/how-to-prevent-sql-injection-attacks/" target="_blank" rel="noopener"&gt;How to Prevent SQL Injection: Attacks and Defense Techniques - Tutorial and Best Practices (ptsecurity.com)&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know how you would convince your organization's firewall to allow these expressions. You might instead have to find another way to query your data. Maybe there's an ID field in your data that is never null or some other where clause that should always return all rows. Something more specific to your data that isn't 1=1.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2022 14:26:54 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2022-01-26T14:26:54Z</dc:date>
    <item>
      <title>Is ' where 1=1'  safe?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136367#M76045</link>
      <description>&lt;P&gt;Dears&lt;/P&gt;&lt;P&gt;In our office, usage of 'where 1-1' using featureLayer.js in arcgis javascript api is blocked for owasp top 10 reasons.&lt;BR /&gt;Please is there any reason to convince the admin that 'where 1=1' is not a hack attacked and is safe to use, or is there any alternative to using where 1=1 in arcgis javascript featureLayer.js api&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 11:13:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136367#M76045</guid>
      <dc:creator>文瑞蘇</dc:creator>
      <dc:date>2022-01-26T11:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136372#M76048</link>
      <description>&lt;P&gt;SQL does not have a true Boolean datatype so &lt;FONT face="courier new,courier"&gt;1=1&lt;/FONT&gt; is a way of evaluating to a constant &lt;FONT face="courier new,courier"&gt;true&lt;/FONT&gt; so all records are returned. You could use any SQL statement that evaluates to &lt;FONT face="courier new,courier"&gt;true&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;2=2
'true'='true'
'all records'='all records'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:19:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136372#M76048</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2022-01-24T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136566#M76061</link>
      <description>&lt;P&gt;In case any esri employee sees this: are there actual reasons behind desicions such as having to use 1=1 or returning 200s for failed requests and then include error objects with status 500 in the response?&lt;BR /&gt;This really isn't how rest should be done.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 20:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136566#M76061</guid>
      <dc:creator>sandrooco</dc:creator>
      <dc:date>2022-01-24T20:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136697#M76066</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I use 'all records' = 'all records' or 'true' = 'true'&lt;/P&gt;&lt;P&gt;The firewall still block it!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 01:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136697#M76066</guid>
      <dc:creator>文瑞蘇</dc:creator>
      <dc:date>2022-01-25T01:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136860#M76084</link>
      <description>&lt;P&gt;Are you sure it's the 1=1 where clause that's the problem? Can you successfully query with &lt;EM&gt;any&lt;/EM&gt; where clause?&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;objectid &amp;gt; 0
shape is not null&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;You might need to request that your organization create a firewall rule allowing traffic from your application server to the ArcGIS Server on ports 6080 and 6443.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 14:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1136860#M76084</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2022-01-25T14:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137190#M76093</link>
      <description>&lt;P&gt;Yes, I can successfully query with where clause such as&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;objectid &amp;gt;=0
shape is not null&lt;/LI-CODE&gt;&lt;P&gt;but not&lt;/P&gt;&lt;LI-CODE lang="c"&gt;1=1&lt;/LI-CODE&gt;&lt;P&gt;My&amp;nbsp;&lt;SPAN&gt;organization use Web application firewall. They say usage '1=1' is not allow for OWASP Top 10 reason....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I proof that This usage is safe for ArcGIS server rest service?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 23:45:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137190#M76093</guid>
      <dc:creator>文瑞蘇</dc:creator>
      <dc:date>2022-01-25T23:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137383#M76099</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/554384"&gt;@文瑞蘇&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;How can I proof that This usage is safe for ArcGIS server rest service?&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Apparently these types of expressions are common in SQL injection attacks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.ptsecurity.com/ww-en/analytics/knowledge-base/how-to-prevent-sql-injection-attacks/" target="_blank" rel="noopener"&gt;How to Prevent SQL Injection: Attacks and Defense Techniques - Tutorial and Best Practices (ptsecurity.com)&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know how you would convince your organization's firewall to allow these expressions. You might instead have to find another way to query your data. Maybe there's an ID field in your data that is never null or some other where clause that should always return all rows. Something more specific to your data that isn't 1=1.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 14:26:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137383#M76099</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2022-01-26T14:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is ' where 1=1' is safe</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137731#M76115</link>
      <description>&lt;P&gt;Thanks again for the detailed instructions.&lt;/P&gt;&lt;P&gt;I saw in ArcGIS&amp;nbsp; featureLayer api .the default&amp;nbsp; clause with where&amp;nbsp; have ‘1=1 ’&lt;/P&gt;&lt;P&gt;&lt;A href="https://raw.githubusercontent.com/Esri/arcgis-js-api/4master/layers/FeatureLayer.js" target="_blank"&gt;https://raw.githubusercontent.com/Esri/arcgis-js-api/4master/layers/FeatureLayer.js&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Maybe&amp;nbsp; I'll&amp;nbsp; try to replace it with&amp;nbsp;&lt;SPAN&gt;some other where clause that should always return all rows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 00:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-where-1-1-safe/m-p/1137731#M76115</guid>
      <dc:creator>文瑞蘇</dc:creator>
      <dc:date>2022-01-27T00:25:23Z</dc:date>
    </item>
  </channel>
</rss>

