<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Safe Strings in PHP (2)</title>
	<link>http://blog.markus-breitenbach.com/2007/07/01/safe-strings-in-php-2/</link>
	<description>AI, Data Mining, Machine Learning and other things</description>
	<pubDate>Wed, 23 Jul 2008 23:39:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: David Spector</title>
		<link>http://blog.markus-breitenbach.com/2007/07/01/safe-strings-in-php-2/#comment-6660</link>
		<author>David Spector</author>
		<pubDate>Mon, 21 Jan 2008 01:18:15 +0000</pubDate>
		<guid>http://blog.markus-breitenbach.com/2007/07/01/safe-strings-in-php-2/#comment-6660</guid>
		<description>I was struck by the complexity of your solution to the safety ("injection") issue for strings in PHP that come from a user.

I, too, have produced programmed solutions to other PHP problems.

I now believe that the proper solution is to fix PHP and/or the other components of Web programming. Something that you always want done should be done in the language or computer system, not in explicit coding.

Since the environment (the server programming tools) know which strings come from users and which do not, they can implement safety automatically.

If the maintainers of PHP are reluctant to improve it in areas such as string safety, that is a political or psychological problem only, and could be solved by proper justification.

After all, PHP has had some large changes in its history already, and people accepted them. A great example of this is the unsafe automatic importation of all GET and POST data into global variables, which is no longer done.

As a former professional compiler writer and language designer, I am well aware of the tradeoff between keeping a language fixed (standard) and improving it. But there are well-known ways to manage this process, such as the standards development policies of Ada and Fortran. In PHP, a simple directive could enable or disable a new feature like automatic safe strings. To gain the advantages, webmasters or programmers would only have to add one line to each PHP page or to the site's .htaccess file or the equivalent to enable the feature, and remove any existing safety code.

I can't see why the maintainers of PHP should object.

David Spector
Springtime Software</description>
		<content:encoded><![CDATA[<p>I was struck by the complexity of your solution to the safety (&#8221;injection&#8221;) issue for strings in PHP that come from a user.</p>
<p>I, too, have produced programmed solutions to other PHP problems.</p>
<p>I now believe that the proper solution is to fix PHP and/or the other components of Web programming. Something that you always want done should be done in the language or computer system, not in explicit coding.</p>
<p>Since the environment (the server programming tools) know which strings come from users and which do not, they can implement safety automatically.</p>
<p>If the maintainers of PHP are reluctant to improve it in areas such as string safety, that is a political or psychological problem only, and could be solved by proper justification.</p>
<p>After all, PHP has had some large changes in its history already, and people accepted them. A great example of this is the unsafe automatic importation of all GET and POST data into global variables, which is no longer done.</p>
<p>As a former professional compiler writer and language designer, I am well aware of the tradeoff between keeping a language fixed (standard) and improving it. But there are well-known ways to manage this process, such as the standards development policies of Ada and Fortran. In PHP, a simple directive could enable or disable a new feature like automatic safe strings. To gain the advantages, webmasters or programmers would only have to add one line to each PHP page or to the site&#8217;s .htaccess file or the equivalent to enable the feature, and remove any existing safety code.</p>
<p>I can&#8217;t see why the maintainers of PHP should object.</p>
<p>David Spector<br />
Springtime Software</p>
]]></content:encoded>
	</item>
</channel>
</rss>
