If an image from another site, is loaded to a page, and then written to canvas as a partial ingredient in a composite, using:
context.drawImage(image, 0, 0, w, h);
it would seem anything insecure would already have occurred on the draw to the canvas. Why then would
window.location = canvas.toDataURL('image/png');
present an error message. SECURITY_ERR; DOM Exception 18. It doesn't seem any more insecure than the extra step of saving the external site image elsewhere first.
My question is not how to get around this, so much, or what the error means, but rather,
Why is this insecure? If the page is loaded by the server the action is surely expected by the author.