malalam
Messages postés10839Date d'inscriptionlundi 24 février 2003StatutMembreDernière intervention 2 mars 2010
-
10 mars 2006 à 18:10
thomvaill
Messages postés366Date d'inscriptionmercredi 7 avril 2004StatutMembreDernière intervention20 février 2007
-
12 mars 2006 à 19:57
Hello tlm,
j'ai décidé de copier ici un petit bout des changements prévus pour PHP6...histoire de mettre un terme à certains débats, sur "Chez moi, Jn'utilise pas addslashes, j'ai les magic_quote à on, $var au lieu de $_POST['var'] c'est plus simple, et ça marche, pas besoin de déclarer une variable avant de l'utiliser, par défaut php n'affiche pas ces warning, etc..." :
Issue: Register globals are the source of many application's security problems and cause a constant grief.
Discussion: We shortly discussed how we want to attend users on the disappearance of this functionality. We decided that if we find the setting during the startup of PHP we raise an E_CORE_ERROR which will prevent the server from starting with a message that points to the documentation. The documentation should explain why this functionality was removed, and some introduction on safe programming.
Conclusions:
<OL simple?>
<LI>We are going to remove the functionality.</LI>
<LI>We throw an E_CORE_ERROR when starting PHP and when we detect the register_globals setting</LI></OL>
Issue: Magic_quotes can be cumbersome for application developers as it is a setting that can be set to on or off without any influence from within the script itself as input parameters are escaped before the script starts.
Discussion: In the same way as with the remove of the register_globals functionality, we decided that if we find the setting during the startup of PHP we raise an E_CORE_ERROR which will prevent the server from starting with a message that points to the documentation. The documentation should explain why this functionality was removed, and point the users at the input_filter extension as replacement.
Conclusions:
<OL simple?>
<LI>We remove the magic_quotes feature from PHP.</LI>
<LI>We throw an E_CORE_ERROR when starting PHP and when we detect the magic_quotes, magic_quotes_sybase or magic_quotes_gpc setting.</LI></OL>
Issue: register_long_arrays and the long versions of the super globals have been deprecated since some time, and do not serve a real purpose.
Discussion: The $_GET[], $_POST[], etc style superglobals are a better alternative since they are shorter and have the same behavior. The register_long_arrays option is also off by default making it less of a problem to remove this.
Conclusions:
<OL simple?>
<LI>We remove the register_long_arrays setting and HTTP_*_VARS globals from PHP.</LI>
<LI>We throw an E_CORE_ERROR when starting PHP and when we detect the register_long_arrays setting.</LI></OL>
Issue: PHP's E_STRICT error level is meant to point users to language level warnings/errors. E_STRICT is currently not part of E_ALL and thus often those E_STRICT messages will be hidden from users.
Discussion: As we want to expose the language level warnings a bit more, and because of having all error levels in E_ALL, except E_STRICT is confusing we will be adding E_STRICT to E_ALL. As the current default is E_ALL & ~E_NOTICE we will effectively turn on E_STRICT by default.
Conclusions:
<OL simple?>
<LI>We add E_STRICT to E_ALL</LI></OL>
<OL simple?>
<LI>We kill "<%" but keep "<?".</LI>
<LI>Jani will prepare a patch that disallows mixing different open/close tags.</LI>
<LI>We will not add "<?php =".</LI></OL>
malalam
Messages postés10839Date d'inscriptionlundi 24 février 2003StatutMembreDernière intervention 2 mars 201025 10 mars 2006 à 23:04
Nan nan antho : WILL NOT ADD, y a marqué ;-)
Mais ils gardent <?...à l'heure du xhtml et donc du xml, j'avoue que je ne pige pas cette décision.
Enfin si...pour laisser encore du temps à ceux qui ont codé leur site avec cette abbréviation, et en html 4...mais bon...
malalam
Messages postés10839Date d'inscriptionlundi 24 février 2003StatutMembreDernière intervention 2 mars 201025 10 mars 2006 à 23:17
Voui mais t'as :
-le titre
- description du problème
- résumé des discussions
- les conclusions. Et dans les conclusions :
Conclusions:
<ol simple=""><li>We kill "<%" but keep "<?".</li><li>Jani will prepare a patch that disallows mixing different open/close tags.</li><li>We will not add "<?php =".</li></ol>;-)
bref, ils ne le feront pas, mais ça a été demandé quand même, y a des gens tordus!
De ttes façons, c'est pas pour tout de suite php6...je pense qu'on a le temps de voir évoluer tout ça.
malalam
Messages postés10839Date d'inscriptionlundi 24 février 2003StatutMembreDernière intervention 2 mars 201025 10 mars 2006 à 23:19
Pour les réfractaires à l'anglais:
on vire <%
on garde <?
on n'autorisera pas le mélange des tags (un coup <?, un coup <?php...nan!)
on n'ajoute pas <?php=$var
malalam
Messages postés10839Date d'inscriptionlundi 24 février 2003StatutMembreDernière intervention 2 mars 201025 10 mars 2006 à 23:59
C'est clair, je trouve que c'est une sortie très rapide...mais si c'est un 6, c'est qu'il y a de gros changements, probablement au niveau du moteur (j'ai pas trouvé encore lol).
Mais c'est vraiment rapide quand même...
cs_Anthomicro
Messages postés9433Date d'inscriptionmardi 9 octobre 2001StatutMembreDernière intervention13 avril 20078 11 mars 2006 à 00:11
J'espère qu'il sera vraiment plus rapide à analyser les scripts, pas à sortir pour laisser place à PHP 7 (quoi que le SEPT c'est un bon chiffre mais bon voilà quoi) lol
FhX
Messages postés2350Date d'inscriptionmercredi 13 octobre 2004StatutMembreDernière intervention18 avril 20153 12 mars 2006 à 13:41
register_globals :
$_POST['var'] = $_GET['var'] = $_COOKIE['var'] = $var
Voila ce qui se passe quand tu met register_globals à ON.
magic_quotes :
$chaine = "Salut, c'est trop cool comme truc !";
$chaine_apres_soumission_formulaire = "Salut, c\'est trop cool comme truc !";
Voila ce qui se passe quand tu met magic_quotes à ON. Je te laisse le soin d'imaginer les trous de sécurités quand tu le mets à OFF :)
cs_Anthomicro
Messages postés9433Date d'inscriptionmardi 9 octobre 2001StatutMembreDernière intervention13 avril 20078 12 mars 2006 à 14:11
ouais mais c'est moisi quand même les magic quotes, ça saoule à la longue, ils auraient pu les laisser soit à on soit à off mais sans possibilité de modification, c'est lourdingue...
FhX
Messages postés2350Date d'inscriptionmercredi 13 octobre 2004StatutMembreDernière intervention18 avril 20153 12 mars 2006 à 14:17
Ca sert à rien de toute facon...
Sachant que tu fais un escape_string() avant toute entrée dans la base de donnée, ca sert pas à grand chose.
En faite, ca a été inventé pour les gars qui codent à l'arraché je crois... genre ceux qui trouvais que mysql_escape_string() était trop long à écrire lol :)