Difference between revisions of "Magic quotes and security"

From Joomla! Documentation

(Blanked the page)
(fixing translation strings)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
<noinclude><languages /></noinclude>
  
 +
{{version|2.5,3.x}}
 +
<translate>
 +
<!--T:1-->
 +
'''Magic Quotes''' was a PHP feature, enabled using the <code>magic_quotes_gpc</code> setting, that escaped (in a very limited way) most of the input data accessible to PHP scripts. It has been removed from PHP for [http://php.net/manual/en/security.magicquotes.whynot.php a variety of reasons]. For more on Magic Quotes, see [http://php.net/magic_quotes PHP Manual, Chapter 31. Magic Quotes].
 +
</translate>
 +
 +
<translate>
 +
<!--T:2-->
 +
This PHP feature has been '''deprecated''' as of PHP 5.3.0 (30-06-2009) and has been '''removed''' from PHP as of PHP 5.4.0.
 +
</translate>
 +
 +
: {{JVer|3.x}} <translate><!--T:3-->
 +
Joomla! 3.0 and above requires <code>magic_quotes_gpc</code> to be set to '''off''' and will not install if <code>magic_quotes_gpc</code> is '''on'''.</translate>
 +
: {{JVer|2.5}} <translate><!--T:4-->
 +
Joomla! 2.5 advises <code>magic_quotes_gpc</code> to be set to '''off'''.</translate>
 +
 +
<translate>
 +
<!--T:5-->
 +
JRequest automatically takes into account the setting of <code>magic_quotes_gpc</code> and adjusts accordingly.  If developers are using JRequest to request input then the actual value of the setting doesn't matter. If developers aren't using it then they will have to take the setting of <code>magic_quotes_gpc</code> into account (for this reason it is still common practice for developers to use JRequest in Joomla! 2.5 - even though it is deprecated).
 +
</translate>
 +
 +
<translate>
 +
<!--T:6-->
 +
JInput does not take this into account. However, due to Joomla! 3.0 and higher requiring that magic quotes are disabled, this is no longer a problem.
 +
</translate>
 +
 +
<noinclude>
 +
[[Category:Security Checklist{{#translation:}}]]
 +
[[Category:Security{{#translation:}}]]
 +
</noinclude>

Latest revision as of 17:38, 4 April 2020

Other languages:
Bahasa Indonesia • ‎English • ‎Nederlands • ‎español • ‎français • ‎italiano • ‎português • ‎português do Brasil

Magic Quotes was a PHP feature, enabled using the magic_quotes_gpc setting, that escaped (in a very limited way) most of the input data accessible to PHP scripts. It has been removed from PHP for a variety of reasons. For more on Magic Quotes, see PHP Manual, Chapter 31. Magic Quotes.

This PHP feature has been deprecated as of PHP 5.3.0 (30-06-2009) and has been removed from PHP as of PHP 5.4.0.

Joomla 3.x Joomla! 3.0 and above requires magic_quotes_gpc to be set to off and will not install if magic_quotes_gpc is on.
Joomla 2.5 Joomla! 2.5 advises magic_quotes_gpc to be set to off.

JRequest automatically takes into account the setting of magic_quotes_gpc and adjusts accordingly. If developers are using JRequest to request input then the actual value of the setting doesn't matter. If developers aren't using it then they will have to take the setting of magic_quotes_gpc into account (for this reason it is still common practice for developers to use JRequest in Joomla! 2.5 - even though it is deprecated).

JInput does not take this into account. However, due to Joomla! 3.0 and higher requiring that magic quotes are disabled, this is no longer a problem.