dolibarr-dev
[Top][All Lists]
Advanced

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

Re: [Dolibarr-dev] Warning GETPOST with alpha and int must be us...


From: Régis Houssin
Subject: Re: [Dolibarr-dev] Warning GETPOST with alpha and int must be us...
Date: Wed, 09 May 2012 18:08:23 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

sauf qu'ici tu filtres l'affichage mais pas l'enregistrement en base,
le champ value est aussi affecté

dolibarrgit/adherents/admin/adherent.php?action=update&constname=ADHERENT_CARD_HEADER_TEXT&constvalue=%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 17:50, Laurent Destailleur (eldy) a écrit :
> 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,
> 

Cordialement,
-- 
Régis Houssin
---------------------------------------------------------
Cap-Networks
Cidex 1130
34, route de Gigny
71240 MARNAY
FRANCE
VoIP: +33 1 83 62 40 03
GSM: +33 6 33 02 07 97
Web: http://www.cap-networks.com/
Email: address@hidden

Dolibarr developer: address@hidden
Web Portal: http://www.dolibarr.fr/
SaaS offers: http://www.dolibox.fr/
Shop: http://www.dolistore.com/
Development platform: https://doliforge.org/
---------------------------------------------------------

Attachment: regis.vcf
Description: Vcard


reply via email to

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