dolibarr-foundation-board
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-foundation-board] Warning GETPOST with alpha and int must


From: Laurent Destailleur (eldy)
Subject: Re: [Dolibarr-foundation-board] Warning GETPOST with alpha and int must be us...
Date: Wed, 09 May 2012 17:50:25 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Le GETPOST n'a jamais été et ne sera jamais une solution fiable à 100% contre les attaques d'injection. Cela permet juste de filtrer en partie mais en partie uniquement. Mais ne pourra jamais filtrer tout, sauf a interdire toute chaine et donc toute saisie utilisateur. Cest possible pour les int mais pas pour les champs libres.

La solution fiable existe et n'a jamais changé, c'est la seule fiable a 100% et la seule correcte: Il faut nettoyer la donnée au moment de son exploitation/affichage, donc en utilisant les échappements :
* dol_escape_htmltag quand on affiche dans du html
* dol_escape_js quand on affiche dans du js
* db->escape pour une generation de requete
* escapeshell pour la generation d'une ligne de commande
etc...

J'ai fait la correction pour celle la.


PS: Pense à utiliser la ml du bureau de l'asso uniquement pour la gestion de l'asso, et la ml developpeur pour les questions dev.


Le 09/05/2012 16:59, Régis Houssin a écrit :
Bonjour Laurent

il faut qu'on trouve une autre solution car on est potentiellement
vulnérable:

/adherents/admin/adherent.php?action=update&constname=ADHERENT_CARD_HEADER_TEXT&constvalue=%ADHERENT%&constnote=%27;alert(String.fromCharCode(88,83,83))//\%27;alert(String.fromCharCode(88,83,83))//%22;alert(String.fromCharCode(88,83,83))//\%22;alert(String.fromCharCode(88,83,83))//--%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E



Le 09/05/12 16:19, Laurent Destailleur a écrit :
   Branch: refs/heads/develop
   Home:   https://github.com/Dolibarr/dolibarr
   Commit: 8cc55ae0dfb1473c9c37fd252ebf7a0e678f63fa
       
https://github.com/Dolibarr/dolibarr/commit/8cc55ae0dfb1473c9c37fd252ebf7a0e678f63fa
   Author: Laurent Destailleur<address@hidden>
   Date:   2012-05-09 (Wed, 09 May 2012)

   Changed paths:
     M htdocs/adherents/admin/adherent.php

   Log Message:
   -----------
   Fix: Warning GETPOST with alpha and int must be used ONLY if content is
not a free text.



Cordialement,

--
Eldy (Laurent Destailleur).
---------------------------------------------------------------
EMail: address@hidden
Web: http://www.destailleur.fr

Dolibarr (Project leader): http://www.dolibarr.org
To make a donation for Dolibarr project via Paypal: address@hidden
AWStats (Author) : http://awstats.sourceforge.net
To make a donation for AWStats project via Paypal: address@hidden
AWBot (Author) : http://awbot.sourceforge.net
CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]