<?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: Sanitizing Input in Python-based Geoprocessing Service? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694726#M53862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy handles nothing magically, nor does python.&amp;nbsp; Al getparameterastext does is makes a string out whatever it is given... if it can, so numbers get converted to text which means you have to convert them back... I prefer sys.argv when you don't want to mess around with objects being passed to scripts. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Some illustrative examples might help fine-tune your question and subsequent responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Dec 2017 22:20:27 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2017-12-22T22:20:27Z</dc:date>
    <item>
      <title>Sanitizing Input in Python-based Geoprocessing Service?</title>
      <link>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694725#M53861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've created a geoprocessing service that creates new features using arcpy.SelectLayerByAttribute_management() with a where clause that is&amp;nbsp;built using an attribute value provided&amp;nbsp;by the user (through a Web AppBuildier geoprocessing widget) on a&amp;nbsp;source SDE-based feature class and then dissolving&amp;nbsp;(there may be multiple features selected) into an in_memory feature class that is appended to&amp;nbsp;the target SDE-based feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know just enough about SQL injection attacks to know that they can be a Bad Thing (tm). Should I be sanitizing&amp;nbsp;the user's input in the string from the GetParameterAsText() call myself, or does arcpy handle this automagically? In this application I (think I) can trust the users who&amp;nbsp;would be entering data, but one drop table command from one attacker slipping in would be bad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:41:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694725#M53861</guid>
      <dc:creator>Karyn_Kerdolff</dc:creator>
      <dc:date>2017-12-22T17:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sanitizing Input in Python-based Geoprocessing Service?</title>
      <link>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694726#M53862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy handles nothing magically, nor does python.&amp;nbsp; Al getparameterastext does is makes a string out whatever it is given... if it can, so numbers get converted to text which means you have to convert them back... I prefer sys.argv when you don't want to mess around with objects being passed to scripts. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Some illustrative examples might help fine-tune your question and subsequent responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2017 22:20:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694726#M53862</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-22T22:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sanitizing Input in Python-based Geoprocessing Service?</title>
      <link>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694727#M53863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option could be moving the feature class from your SDE database into either in_memory or the scratchGDB and then do any processing against that feature class so you won't have to worry about that type of problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2017 23:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sanitizing-input-in-python-based-geoprocessing/m-p/694727#M53863</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-12-22T23:06:57Z</dc:date>
    </item>
  </channel>
</rss>

