From bf45be3aed01ff10413af3d56a66007afe0be06f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 27 Jul 2016 07:50:43 +0200 Subject: roundcubemail: 1.2.1 --- composer.json | 3 ++- roundcubemail-1.2-no_swf.patch | 6 ------ roundcubemail-1.2.1-no_swf.patch | 7 +++++++ roundcubemail-pr313.patch | 12 ++++++------ roundcubemail.spec | 11 ++++++++--- 5 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 roundcubemail-1.2-no_swf.patch create mode 100644 roundcubemail-1.2.1-no_swf.patch diff --git a/composer.json b/composer.json index f14541c..33ae8e3 100644 --- a/composer.json +++ b/composer.json @@ -22,13 +22,14 @@ ], "require": { "php": ">=5.3.7", + "pear/pear-core-minimal": "~1.10.1", "roundcube/plugin-installer": "~0.1.6", "pear-pear.php.net/net_socket": "~1.0.12", "pear-pear.php.net/auth_sasl": "~1.0.6", "pear-pear.php.net/net_idna2": "~0.1.1", "pear-pear.php.net/mail_mime": "~1.10.0", "pear-pear.php.net/net_smtp": "~1.7.1", - "pear-pear.php.net/crypt_gpg": "~1.4.1", + "pear-pear.php.net/crypt_gpg": "~1.4.2", "roundcube/net_sieve": "~1.5.0" }, "require-dev": { diff --git a/roundcubemail-1.2-no_swf.patch b/roundcubemail-1.2-no_swf.patch deleted file mode 100644 index d15cd1b..0000000 --- a/roundcubemail-1.2-no_swf.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- roundcubemail-1.2-beta/program/js/tinymce/plugins/media/plugin.min.js.orig 2015-12-28 16:03:08.380335030 +0100 -+++ roundcubemail-1.2-beta/program/js/tinymce/plugins/media/plugin.min.js 2015-12-28 16:04:15.231645905 +0100 -@@ -1 +1 @@ --tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(l,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='"}else"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),("iframe"==a||"object"==a||"embed"==a||"video"==a||"audio"==a)&&(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}var l=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1}],m=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b,c){for(var e,f,g,h,i,j,k,l,m=b.length;m--;)if(f=b[m],f.parent&&("script"!=f.name||(l=d(f.attr("src"))))){for(g=new tinymce.html.Node("img",1),g.shortEnded=!0,l&&(l.width&&f.attr("width",l.width.toString()),l.height&&f.attr("height",l.height.toString())),j=f.attributes,e=j.length;e--;)h=j[e].name,i=j[e].value,"width"!==h&&"height"!==h&&"style"!==h&&(("data"==h||"src"==h)&&(i=a.convertURL(i,h)),g.attr("data-mce-p-"+h,i));k=f.firstChild&&f.firstChild.value,k&&(g.attr("data-mce-html",escape(k)),g.firstChild=null),g.attr({width:f.attr("width")||"300",height:f.attr("height")||("audio"==c?"30":"150"),style:f.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),f.replace(g)}}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k=a.length;k--;)if(c=a[k],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&d.attr({width:c.attr("width"),height:c.attr("height")}),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var l=f[e].name;0===l.indexOf("data-mce-p-")&&d.attr(l.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");("audio"==b||"script"==b)&&a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.addCommand("mceMedia",e),this.showDialog=e}); -\ Pas de fin de ligne à la fin du fichier -+tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=false,tinymce.each(l,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='"}else"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),("iframe"==a||"object"==a||"embed"==a||"video"==a||"audio"==a)&&(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}var l=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1}],m=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b,c){for(var e,f,g,h,i,j,k,l,m=b.length;m--;)if(f=b[m],f.parent&&("script"!=f.name||(l=d(f.attr("src"))))){for(g=new tinymce.html.Node("img",1),g.shortEnded=!0,l&&(l.width&&f.attr("width",l.width.toString()),l.height&&f.attr("height",l.height.toString())),j=f.attributes,e=j.length;e--;)h=j[e].name,i=j[e].value,"width"!==h&&"height"!==h&&"style"!==h&&(("data"==h||"src"==h)&&(i=a.convertURL(i,h)),g.attr("data-mce-p-"+h,i));k=f.firstChild&&f.firstChild.value,k&&(g.attr("data-mce-html",escape(k)),g.firstChild=null),g.attr({width:f.attr("width")||"300",height:f.attr("height")||("audio"==c?"30":"150"),style:f.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),f.replace(g)}}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k=a.length;k--;)if(c=a[k],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&d.attr({width:c.attr("width"),height:c.attr("height")}),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var l=f[e].name;0===l.indexOf("data-mce-p-")&&d.attr(l.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");("audio"==b||"script"==b)&&a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.addCommand("mceMedia",e),this.showDialog=e}); diff --git a/roundcubemail-1.2.1-no_swf.patch b/roundcubemail-1.2.1-no_swf.patch new file mode 100644 index 0000000..68b3c6c --- /dev/null +++ b/roundcubemail-1.2.1-no_swf.patch @@ -0,0 +1,7 @@ +diff -up roundcubemail-1.2.1/program/js/tinymce/plugins/media/plugin.min.js.orig roundcubemail-1.2.1/program/js/tinymce/plugins/media/plugin.min.js +--- roundcubemail-1.2.1/program/js/tinymce/plugins/media/plugin.min.js.orig 2016-07-27 07:16:16.198484873 +0200 ++++ roundcubemail-1.2.1/program/js/tinymce/plugins/media/plugin.min.js 2016-07-27 07:18:45.177194918 +0200 +@@ -1 +1 @@ +-tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(o,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='"}else"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),"iframe"!=a&&"object"!=a&&"embed"!=a&&"video"!=a&&"audio"!=a||(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}function l(b,c){var d,e,f,g,h;for(f=b.attributes,g=f.length;g--;)d=f[g].name,e=f[g].value,"width"!==d&&"height"!==d&&"style"!==d&&("data"!=d&&"src"!=d||(e=a.convertURL(e,d)),c.attr("data-mce-p-"+d,e));h=b.firstChild&&b.firstChild.value,h&&(c.attr("data-mce-html",escape(h)),c.firstChild=null)}function m(a){var b,c=a.name;return b=new tinymce.html.Node("img",1),b.shortEnded=!0,l(a,b),b.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==c?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),b}function n(a){var b,c,d,e=a.name;return b=new tinymce.html.Node("span",1),b.attr({contentEditable:"false",style:a.attr("style"),"data-mce-object":e,"class":"mce-preview-object mce-object-"+e}),l(a,b),c=new tinymce.html.Node(e,1),c.attr({src:a.attr("src"),allowfullscreen:a.attr("allowfullscreen"),width:a.attr("width")||"300",height:a.attr("height")||("audio"==e?"30":"150"),frameborder:"0"}),d=new tinymce.html.Node("span",1),d.attr("class","mce-shim"),b.append(c),b.append(d),b}var o=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],p=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b){for(var c,e,f,g=b.length;g--;)c=b[g],c.parent&&(c.parent.attr("data-mce-object")||("script"!=c.name||(f=d(c.attr("src"))))&&(f&&(f.width&&c.attr("width",f.width.toString()),f.height&&c.attr("height",f.height.toString())),e="iframe"==c.name&&a.settings.media_live_embeds!==!1&&tinymce.Env.ceFalse?n(c):m(c),c.replace(e)))}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k,l=a.length;l--;)if(c=a[l],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&(k=c.attr("class"),k&&-1!==k.indexOf("mce-preview-object")?d.attr({width:c.firstChild.attr("width"),height:c.firstChild.attr("height")}):d.attr({width:c.attr("width"),height:c.attr("height")})),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var m=f[e].name;0===m.indexOf("data-mce-p-")&&d.attr(m.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("click keyup",function(){var b=a.selection.getNode();b&&a.dom.hasClass(b,"mce-preview-object")&&a.dom.getAttrib(b,"data-mce-selected")&&b.setAttribute("data-mce-selected","2")}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!=b&&"script"!=b||a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object]","span[data-mce-object]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.on("setContent",function(){a.$("span.mce-preview-object").each(function(b,c){var d=a.$(c);0===d.find("span.mce-shim",c).length&&d.append('')})}),a.addCommand("mceMedia",e),this.showDialog=e}); +\ Pas de fin de ligne à la fin du fichier ++tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=false,tinymce.each(o,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='"}else"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),"iframe"!=a&&"object"!=a&&"embed"!=a&&"video"!=a&&"audio"!=a||(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}function l(b,c){var d,e,f,g,h;for(f=b.attributes,g=f.length;g--;)d=f[g].name,e=f[g].value,"width"!==d&&"height"!==d&&"style"!==d&&("data"!=d&&"src"!=d||(e=a.convertURL(e,d)),c.attr("data-mce-p-"+d,e));h=b.firstChild&&b.firstChild.value,h&&(c.attr("data-mce-html",escape(h)),c.firstChild=null)}function m(a){var b,c=a.name;return b=new tinymce.html.Node("img",1),b.shortEnded=!0,l(a,b),b.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==c?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),b}function n(a){var b,c,d,e=a.name;return b=new tinymce.html.Node("span",1),b.attr({contentEditable:"false",style:a.attr("style"),"data-mce-object":e,"class":"mce-preview-object mce-object-"+e}),l(a,b),c=new tinymce.html.Node(e,1),c.attr({src:a.attr("src"),allowfullscreen:a.attr("allowfullscreen"),width:a.attr("width")||"300",height:a.attr("height")||("audio"==e?"30":"150"),frameborder:"0"}),d=new tinymce.html.Node("span",1),d.attr("class","mce-shim"),b.append(c),b.append(d),b}var o=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],p=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b){for(var c,e,f,g=b.length;g--;)c=b[g],c.parent&&(c.parent.attr("data-mce-object")||("script"!=c.name||(f=d(c.attr("src"))))&&(f&&(f.width&&c.attr("width",f.width.toString()),f.height&&c.attr("height",f.height.toString())),e="iframe"==c.name&&a.settings.media_live_embeds!==!1&&tinymce.Env.ceFalse?n(c):m(c),c.replace(e)))}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k,l=a.length;l--;)if(c=a[l],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&(k=c.attr("class"),k&&-1!==k.indexOf("mce-preview-object")?d.attr({width:c.firstChild.attr("width"),height:c.firstChild.attr("height")}):d.attr({width:c.attr("width"),height:c.attr("height")})),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var m=f[e].name;0===m.indexOf("data-mce-p-")&&d.attr(m.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("click keyup",function(){var b=a.selection.getNode();b&&a.dom.hasClass(b,"mce-preview-object")&&a.dom.getAttrib(b,"data-mce-selected")&&b.setAttribute("data-mce-selected","2")}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!=b&&"script"!=b||a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object]","span[data-mce-object]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.on("setContent",function(){a.$("span.mce-preview-object").each(function(b,c){var d=a.$(c);0===d.find("span.mce-shim",c).length&&d.append('')})}),a.addCommand("mceMedia",e),this.showDialog=e}); diff --git a/roundcubemail-pr313.patch b/roundcubemail-pr313.patch index d60e47b..24dbfae 100644 --- a/roundcubemail-pr313.patch +++ b/roundcubemail-pr313.patch @@ -11,12 +11,12 @@ diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index 7388472..c2fc70f 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php -@@ -1184,7 +1184,7 @@ public static function write_log($name, $line) +@@ -1195,7 +1195,7 @@ class rcube + $log_dir = RCUBE_INSTALL_PATH . 'logs'; } - // try to open specific log file for writing -- $logfile = $log_dir.'/'.$name; -+ $logfile = $log_dir.'/'.$name.'.log'; +- return file_put_contents("$log_dir/$name", $line, FILE_APPEND) !== false; ++ return file_put_contents("$log_dir/$name.log", $line, FILE_APPEND) !== false; + } - if ($fp = @fopen($logfile, 'a')) { - fwrite($fp, $line); + /** diff --git a/roundcubemail.spec b/roundcubemail.spec index 3b6c3d6..3676139 100644 --- a/roundcubemail.spec +++ b/roundcubemail.spec @@ -19,7 +19,7 @@ %global roundcubedir %{_datadir}/roundcubemail %global _logdir /var/log Name: roundcubemail -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Round Cube Webmail is a browser-based multilingual IMAP client @@ -45,7 +45,7 @@ Source2: roundcubemail.logrotate Source4: roundcubemail-README.rpm # Elegantly handle removal of moxieplayer Flash binary in tinymce # media plugin (see "Drop precompiled flash" in %%prep) -Patch0: roundcubemail-1.2-no_swf.patch +Patch0: roundcubemail-1.2.1-no_swf.patch # Non-upstreamable: Adjusts config path to Fedora policy Patch1: roundcubemail-1.1.0-confpath.patch @@ -88,6 +88,7 @@ Requires: php-spl Requires: php-xml # From composer.json-dist, require # "php": ">=5.3.7", +# "pear/pear-core-minimal": "~1.10.1", # "roundcube/plugin-installer": "~0.1.6", # "pear-pear.php.net/net_socket": "~1.0.12", # "pear-pear.php.net/auth_sasl": "~1.0.6", @@ -97,12 +98,13 @@ Requires: php-xml # "pear-pear.php.net/crypt_gpg": "~1.4.1", # "roundcube/net_sieve": "~1.5.0" # not available and doesn't make sense roundcube/plugin-installer +Requires: php-pear(PEAR) >= 1.10.1 Requires: php-pear(Net_Socket) >= 1.0.12 Requires: php-pear(Auth_SASL) >= 1.0.6 Requires: php-pear(Net_IDNA2) >= 0.1.1 Requires: php-pear(Mail_Mime) >= 1.10.0 Requires: php-pear(Net_SMTP) >= 1.7.1 -Requires: php-pear(Crypt_GPG) >= 1.4.1 +Requires: php-pear(Crypt_GPG) >= 1.4.2 Requires: php-composer(roundcube/net_sieve) >= 1.5.0 # From composer.json-dist, suggest # "pear-pear.php.net/net_ldap2": "~2.2.0 required for connecting to LDAP address books", @@ -277,6 +279,9 @@ rm -rf %{buildroot} %changelog +* Wed Jul 27 2016 Remi Collet - 1.2.1-1 +- update to 1.2.1 + * Fri May 27 2016 Remi Collet - 1.2.0-1 - update to 1.2.0 - raise dependency on Crypt_GPG ~1.4.1 -- cgit