There is two questions here: * is it OK to add new resource types dynamically ? and for me it's OK * is it OK to introduce it in 5.4 ? and given the fact that you feel the need to send that mail it seems to me you should probably wait for 6.0 since you insisted yourself of being extra careful with what we put in 5.x.
On Thu, Jan 16, 2014 at 3:02 PM, Sergiu Dumitriu <[email protected]> wrote: > On 01/16/2014 07:58 AM, [email protected] wrote: >> Hi devs, >> >> I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 >> (which allows copy pasting images in the WYSIWYG editor btw). However I’ve >> just realized (had forgotten) that my code will break image attachments to a >> subwiki named “data”: >> >> image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC >> >> Of course the solution for a user is to prefix with “attach:”, to show that >> it’s an image coming from an attachment: >> >> image:attach:data:…. >> >> We discussed this previously: >> * Original thread: http://markmail.org/thread/vw3derowozijqalr >> * This lead to this first VOTE which was not conclusive: >> http://markmail.org/thread/vw3derowozijqalr >> * Which lead to another VOTE which was also not conclusive: >> http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains >> 2 proposals, the last one beeing a choice between A) and B)). >> >> However we kind of agreed at the end that it would be acceptable to break >> backward compatibility (solution A in the last thread). >> >> So the question here: >> >> * Should I revert my change that I did for 5.4? >> * Is it ok to break backward compatibility and thus add this in XWiki Syntax >> 2.1 as I did and document it on the release notes? >> >> Note that I could also relatively easily implement a new rendering >> configuration option (e.g. rendering.ignoreResourceTypes=user,data) which >> would be optional and that would allow to ignore some resource types (IMO >> this is slightly overkill). >> >> WDYT? >> >> Thanks >> -Vincent > > +1 for breaking backwards compatibility. > > Would it be possible to also check if what's after "data:" starts with > "image/"? The chances of having a "data" wiki, and a space with / in it > are pretty slim, considering that / isn't quite working in both Tomcat > and Apache HTTPD. +1, you should check if what you have is a valid data as much as possible > -- > Sergiu Dumitriu > http://purl.org/net/sergiu > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

