It is not the role of getpost to transform data to be sanitized for usage
into html tag.  For this you must use dol_escape_html during html output.
Getpost must avoid to transform data for special char because there is a
lot of case we need to have it safe.
Le 14 août 2012 16:38, "Florian Henry" <[email protected]> a
écrit :

> Hello,
>
>     I wonder something with the GETPOST method.
>     It check for 'alpha' if there is " (double quote) in the input
> variable and in this case, result is blank. I think it's a little bit hard.
>     The comment on the top of this check is // '"' is dangerous because
> param in url can close the href= or src= and add javascript functions.
>     Why do not test if =" (equal (many space) and double quote) is in the
> input variable and in this case result will be blank ?
>
>     I'm not an expert of hacking so if my approach is wrong do not
> hesitate to tell me.
>
> Kind regards
> ---------
>
>  Bonjour a tous,
>
>     Je me pose une question sur la vérification alpha de la method GETPOST.
>     Si la chaîne contient " (guillemet) elle retourne une chaine vide. Je
> pense que c'est un peu rude comme test. Il est fréquent d'utiliser des
> guillemets dans du texte.
>     Dans le commentaire au dessus de cette vérification il est dit :
> guillemet est dangereux car les paramétré en URL avec href ou src peuvent
> inclure des instruction javascript.
>     Pourquoi ne pas tester =" (égale (*espace) guillemet) et renvoyer une
> chaîne vide dans ce cas.
>
>     Je ne suis pas un expert des technique de hack donc dites moi si je me
> trompe.
>
> Cdt.
>
> --
> Florian HENRY
> [email protected]
> +33 6 03 76 48 07
> http://www.open-concept.pro
>
>
> ______________________________**_________________
> Dolibarr-dev mailing list
> [email protected]
> https://lists.nongnu.org/**mailman/listinfo/dolibarr-dev<https://lists.nongnu.org/mailman/listinfo/dolibarr-dev>
>
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à