[eside-ghost] Cross site scripting

Iker Perez de Albeniz - Txupete - txupete en gmail.com
Mar Ene 18 11:12:29 CET 2011


Aupa!

tengo una duda existencial sobre javascript y cross site scripting..

Copio el ejemplo de la pagina de jquery:

http://api.jquery.com/jQuery.getJSON/

<!DOCTYPE html>
<html>
<head>
  <style>img{ height: 100px; float: left; }</style>
  <script src="http://code.jquery.com/jquery-1.4.4.js"></script>
</head>
<body>
  <div id="images">

</div>
<script>
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
  {
    tags: "cat",
    tagmode: "any",
    format: "json"
  },
  function(data) {
    $.each(data.items, function(i,item){
      $("<img/>").attr("src", item.media.m).appendTo("#images");
      if ( i == 3 ) return false;
    });
  });</script>

</body>
</html>

todo funciona OK..

sustitullo la url de flikr por una mia y hago un print de data para
ver que recibo..

<!DOCTYPE html>
<html>
<head>
  <style>img{ height: 100px; float: left; }</style>
  <script src="http://code.jquery.com/jquery-1.4.4.js"></script>
</head>
<body>
  <div id="images">

</div>
<script>
$.getJSON("http://openbizkaibus.appspot.com/api/LineasMunicipio?jsoncallback=?",
  {
    codmunicipio: "914",
    descmunicipio: "ARRATZU"
  },
  function(data) {
      $("#images").append(data);
  });</script>

</body>
</html>

Con firebug en red veo que se hace la petición y que se recibe la
infromacion pero el print de data no hace nada.. hay que hacer algo a
nivel de servidor para permitir cross site scripting o algo asi?

-- 
Iker Perez de Albeniz
web: http://www.ikeralbeniz.net/


Más información sobre la lista de distribución eside-ghost