MyBB Community Forums

Full Version: Prevent pasting of images in editor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've read some tracking on this issue - https://github.com/mybb/mybb/pull/3808 - comes to mind.  In my case, want to prevent users from doing this period.  Had a few successfully (from their standpoint), add images to a post via paste from the clipboard.  Always smaller images, which apparently didn't break the DB character limit.  

Don't want image data in the database at all - think that's just asking for trouble.  Or automatically converted to an attachment for that matter.

Any ideas to prevent this from happening at all?

1824, mildly customised theme
php 7.3.27
MySQLi 5.7.31

Board URL: dartsnutz.net

cheers...
I suppose you could hook to the update/insert hooks to remove the code on the fly, if you share a full message example I could get something working (probably using the Hooks plugin).
(2021-02-19, 09:09 PM)Omar G. Wrote: [ -> ]I suppose you could hook to the update/insert hooks to remove the code on the fly, if you share a full message example I could get something working (probably using the Hooks plugin).

Next time I have one, will do so.   All I have right now is a partial screenshot - no good for this purpose I'm afraid.

cheers..

Edit:  Tried to reproduce in my test system, but failed as over 65535 characters.  Of course, I just copied the image as presented, so I could save and properly upload using Shade's MyDropzone.  But as before, always starts with [img]data:image/png;base64 - then page after page of characters.