How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

Last post 01-11-2012, 9:39 AM by Kenneth. 5 replies.
Sort Posts: Previous Next
  •  01-10-2012, 11:11 AM 72592

    How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

    Due to issues with MSFT Security advisory 2659883 - http://technet.microsoft.com/en-us/security/advisory/2659883?qstr=CR_CC=20111229OOBSMB&CR_ID=, I'm seeing a small amount of errors related to it, as it specifically relates to cuteeditor.
     
    The feature where you can copy and paste an image from somewhere into CuteEditor is undesired, and runs contrary to efficiency in the storage of our html files.  Images should be hyperlinked, and our HTML Documents should not have embedded image data.
     
    Most troubling here is that this feature, as slick as it is,
    1) circumvents our ability to audit and monitor copy-righted material.  Anyone can just go to a page  somewhere on the internet, and copy and paste an image
    2) image data embedded in the page data  dramatically increases page size when it gets persisted to our storage mechanism.
     
     Steps to reproduce:
    1) Go to somewhere on the internet
    2) copy the image (Right Click in firefox)
    3) go to the cutesoft demo page
    4) paste the image in normal view
    5) Post - you'll see an error on patched servers (The URL-encoded form data is not valid. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object. at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded())
     

     

     mostly interested in determining how to disable copy + paste of images with the image data being translated as src="data:image\type", but there are also issues I'm experiencing with postbacks with pages with this kind of data bumping into the constraints of the security patch.
  •  01-10-2012, 3:49 PM 72597 in reply to 72592

    Re: How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

    Hi wzs5011,
     
    It works fine for me. I have tested on IE 9, firefox 8.01, firefox3.6.12 and chrome 16.0.912.63 m
     
    I copied the content from http://www.microsoft.com/en-us/default.aspx, used ctrl+a and ctrl+c copied all the contents and pasted into editor. Then click the submit button
     
    also, I have tried right click on the image to copy it and pasted into editor.
     
    Regards,
     
    Ken 
  •  01-10-2012, 4:06 PM 72601 in reply to 72597

    Re: How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

    I think this hard to reproduce because you're
    a) either not patched
    b) is related to the viewstate size of the returned request that contains the image inside the cached editor contents (see my other ticket from today)
     
    No matter, because really the point of this ticket is: How do you disable the feature to paste an image from "RIGHT CLICK COPY IMAGE" so that it doesn't add an <img src="data:..."
     
    To Reproduce:
     
    1) Open up MS Paint
    2) Go to the globe icon at the top of this page (immediately to the left of support forums)
    3) right click the image in Firefox, select COPY IMAGE from the menu option
    4) go back to paint
    5) paste the image into paint
    6) go to cuteeditor, paste the image into the cuteeditor in Normal View
    7) go to HTML View, look at the img src= - it should look like: img src="data:image/png;base64,iVBORw..."
     
    I do not want the users to be able to insert image data in this fashion, because it creates unnecessarily massive pages.  The HTML file data should link to a separate file, and never have embedded data in it.  In other words, the specific paste operation should fail, and DO NOTHING.
     
    The issue I'm describing has nothing to do with copying and pasting HTML - it has to do with copying a binary file, and pasting it into the Cute Editor.
     
    I want to turn that binary paste functionality off on the cuteeditor client, but I want to allow users to continue pasting HTML from the buffer.
     
  •  01-11-2012, 5:06 AM 72617 in reply to 72601

    Re: How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

    Hi wzs5011,
     
    I can reproduce it on firefox. I will report it to the development team. Once issue is fixed, I will keep you posted.
     
    Set EditorOnPaste to PasteText will disable the image paste, but will also disable the html content paste too.
     
       <CE:Editor ID="Editor1" runat="server" EditorOnPaste="PasteText" /> 
     
    Regards,
     
    Ken 
  •  01-11-2012, 7:23 AM 72624 in reply to 72617

    Re: How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

    Just to confirm - there is no way to disable image paste only?  Can you double check that?
     
    Thanks
     
  •  01-11-2012, 9:39 AM 72632 in reply to 72624

    Re: How to disable copy and paste image functionality in cute editor <img src="data:image\png..."

    Hi wzs5011,
     
    For now have not the way to only disable the image paste . Sorry for your inconvenience.
     
    Regards,
     
    Ken 
View as RSS news feed in XML