title: jsoup unexpectedly fetching shopwiki image
body: <p>I am using the following code to fetch images from the web:</p>
  
  <pre><code>import java.io.FileOutputStream;
  import java.io.IOException;
  
  import org.jsoup.Jsoup;
  
  public class fetchImageTest {
      public static void main(String[] args) throws Exception {       
          saveImage(args[0], args[1]);
      }
  
      private static boolean saveImage(String string, String destination) throws IOException {
  
          string = string.replaceAll(" ", "%20");
  
          try {
              byte[] image = Jsoup.connect(string).ignoreContentType(true).timeout(10000).execute().bodyAsBytes();
  
              FileOutputStream os = new FileOutputStream(destination);
  
              os.write(image);        
              os.close();
  
              return true;
          }
  
          catch (IOException e) {
              System.out.println("couldn't open " + string);
              return false;
          }   
  
          catch (Exception e) {
              System.out.println("couldn't open - general exception" + string);
              return false;
          }
      }
  }
  </code></pre>
  
  <p>Due to a bug in some of my other code, I tried to fetch an image from a broken URL, of the form:</p>
  
  <pre><code>http://shop.foo.comhttp://shop.foo.com/1.jpg
  </code></pre>
  
  <p>My code ended up fetching a shopwiki image, like <img src="https://i.stack.imgur.com/aOePj.jpg" alt="shopwiki-image"></p>
  
  <p>I am using jsoup-1.7.1.jar. Is there a virus on my server? Is there a virus with my jsoup jar file?</p>
  
  <p>I really have no idea ... </p>