silexlabs / Cocktail

An HTML/CSS rendering engine for the Haxe language
http://www.silexlabs.org/haxe/cocktail/
Other
192 stars 34 forks source link

HbbTV: ResourceLoaderManager.loadString() security issue #87

Closed codam closed 12 years ago

codam commented 12 years ago

On Philips & Toshiba TVs, there is an error when trying to get an online file.

cf. testsHbbTV/test_2.3-dynamic_rss_en_ligne_cocktail

The error comes from the following line: ResourceLoaderManager.loadString( "http://demos.silexlabs.org/cocktail/simple-webapp/XmlProxy.php?url=" + StringTools.urlEncode(xmlUrl), onXmlLoaded, onXmlError);

Which throws following error: "Reference Error: Security Violation"

yanhick commented 12 years ago

Les navigateurs de ces TV ne doivent pas implementer le chargement en cross-domain qui est une norme assez récente. Il faudrait savoir si chaque application hbbtv à une url d'origine associer et utiliser un proxy à partir de cette URL.

yanhick commented 12 years ago

tu peux peut-être essayer en mettant le proxy php dans le ftp, on sait jamais

codam commented 12 years ago

J'ai essayé en mettant le proxy dans le ftp, et dans ce cas ça ne marche sur aucune TV.

Atitre info, j'ai fait un trace de "window.location" et ça me sort: http://hbbtv.celeonet.fr/test_yannick

codam commented 12 years ago

J'ai essayé en mettant le proxy dans le ftp, et dans ce cas ça ne marche sur aucune TV.

Atitre info, j'ai fait un trace de "window.location" et ça me sort: http://hbbtv.celeonet.fr/test_yannick

yanhick commented 12 years ago

tu peux essayer aussi en mettant l'url vers le proxy en absolue : "http://hbbtv.celeonet.fr/test_yannick/proxy.php"

codam commented 12 years ago

J'ai fait le test hier dans la foulée mais ça n'a pas marché non plus.

codam commented 12 years ago

J'ai fait le test hier dans la foulée mais ça n'a pas marché non plus.

codam commented 12 years ago

Arthur m'a donné quelques pistes. Je te tiens au jus de ce que ça donne

codam commented 12 years ago

Arthur m'a donné quelques pistes. Je te tiens au jus de ce que ça donne

codam commented 12 years ago

Au final ca marche sur toutes les TVs en utilisant "http://demos.silexlabs.org/cocktail/hbbtv/FTV/tests/" dans l'interface du showroom (http://hbbtv.francetv.fr/debug/showroom/index.php) avec un proxy situé sur le meme server

yanhick commented 12 years ago

c'est cool, bien joué