diff --git a/.gitignore b/.gitignore index 0bf36f8..57243c1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ clog /roundcubemail-1.2.3.tar.gz /roundcubemail-1.2.4.tar.gz /roundcubemail-1.2.5.tar.gz +/roundcubemail-1.3.0.tar.gz +/roundcubemail-1.3.0-complete.tar.gz diff --git a/roundcubemail-1.2.1-no_swf.patch b/roundcubemail-1.2.1-no_swf.patch deleted file mode 100644 index 68b3c6c..0000000 --- a/roundcubemail-1.2.1-no_swf.patch +++ /dev/null @@ -1,7 +0,0 @@ -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-README-rpm.txt b/roundcubemail-README-rpm.txt new file mode 100644 index 0000000..5e558c5 --- /dev/null +++ b/roundcubemail-README-rpm.txt @@ -0,0 +1,53 @@ +Additional installation and update information: + +Upstream documentation: http://trac.roundcube.net/wiki + +Notice +- temporary files are stored in /var/lib/roundcubemail/temp +- logs files are stored in /var/log/roundcubemail +- configuration files are stored in /etc/roundcubemail +- PGP keys used by enigma plugin are stored in /var/lib/roundcubemail/enigma + +As those directories are not served by the web server, +there is no need to protect them. + +Databases + +Roundcube supports various database providers, including SQLite, MySQL and +PostgreSQL. The package depends only on php-pdo, which provides SQLite +support. However, the default configuration is for a MySQL database, for +performance reasons. To use the MySQL database, ensure php-mysql is +installed. If you want to use another database, adjust the configuration +file, and ensure the appropriate PDO plugin is installed. If necessary. + + +The installer is available at http://localhost/roundcubemail/installer +The webmail is available at http://localhost/roundcubemail + +By default, access to Roundcube and the installer is only allowed from the +server, locally, in /etc/httpd/conf.d/roundcubemail.conf . Best practice is +to create a new file - e.g. /etc/httpd/conf.d/z-roundcubemail-allow.conf - +to adjust the access permissions. You can also edit roundcubemail.conf directly, +but then any changes to it in future package updates will cause the creation +of a .rpmnew file, and you will have to merge the changes manually: creating +a new config file to configure access permissions avoids that. + +First use the installer to configure Roundcube, ideally from the server so you +do not need to allow any wider access to the installer, but you can use a new +config file to grant wider access to /usr/share/roundcubemail and +/usr/share/roundcubemail/installer if necessary. Once you have completed +deployment, you should restrict access to the /installer subdirectory again, as +an attacker could use it to do anything they liked to your Roundcube +installation. + +UPGRADING: when upgrading from < 1.0 the old configuration files named +main.inc.php and db.inc.php are now deprecated and should be replaced with one +single config.inc.php file. Run the /usr/share/roundcube/bin/update.sh script +as root to get this conversion done or manually merge the files. The update +script will also update the database configuration. Check the permissions of +the config.inc.php file and all backups the script creates! Make sure they +are not world-readable, as they may contain sensitive information (e.g. +database passwords). + +NOTE: the new config.inc.php should only contain options that differ from the +ones listed in defaults.inc.php. diff --git a/roundcubemail-README.rpm b/roundcubemail-README.rpm deleted file mode 100644 index 5e558c5..0000000 --- a/roundcubemail-README.rpm +++ /dev/null @@ -1,53 +0,0 @@ -Additional installation and update information: - -Upstream documentation: http://trac.roundcube.net/wiki - -Notice -- temporary files are stored in /var/lib/roundcubemail/temp -- logs files are stored in /var/log/roundcubemail -- configuration files are stored in /etc/roundcubemail -- PGP keys used by enigma plugin are stored in /var/lib/roundcubemail/enigma - -As those directories are not served by the web server, -there is no need to protect them. - -Databases - -Roundcube supports various database providers, including SQLite, MySQL and -PostgreSQL. The package depends only on php-pdo, which provides SQLite -support. However, the default configuration is for a MySQL database, for -performance reasons. To use the MySQL database, ensure php-mysql is -installed. If you want to use another database, adjust the configuration -file, and ensure the appropriate PDO plugin is installed. If necessary. - - -The installer is available at http://localhost/roundcubemail/installer -The webmail is available at http://localhost/roundcubemail - -By default, access to Roundcube and the installer is only allowed from the -server, locally, in /etc/httpd/conf.d/roundcubemail.conf . Best practice is -to create a new file - e.g. /etc/httpd/conf.d/z-roundcubemail-allow.conf - -to adjust the access permissions. You can also edit roundcubemail.conf directly, -but then any changes to it in future package updates will cause the creation -of a .rpmnew file, and you will have to merge the changes manually: creating -a new config file to configure access permissions avoids that. - -First use the installer to configure Roundcube, ideally from the server so you -do not need to allow any wider access to the installer, but you can use a new -config file to grant wider access to /usr/share/roundcubemail and -/usr/share/roundcubemail/installer if necessary. Once you have completed -deployment, you should restrict access to the /installer subdirectory again, as -an attacker could use it to do anything they liked to your Roundcube -installation. - -UPGRADING: when upgrading from < 1.0 the old configuration files named -main.inc.php and db.inc.php are now deprecated and should be replaced with one -single config.inc.php file. Run the /usr/share/roundcube/bin/update.sh script -as root to get this conversion done or manually merge the files. The update -script will also update the database configuration. Check the permissions of -the config.inc.php file and all backups the script creates! Make sure they -are not world-readable, as they may contain sensitive information (e.g. -database passwords). - -NOTE: the new config.inc.php should only contain options that differ from the -ones listed in defaults.inc.php. diff --git a/roundcubemail-pr313.patch b/roundcubemail-pr313.patch index 24dbfae..f68a110 100644 --- a/roundcubemail-pr313.patch +++ b/roundcubemail-pr313.patch @@ -1,17 +1,17 @@ -From e8e951098db781422f7ed557d97b1b218d7529de Mon Sep 17 00:00:00 2001 +From 132a807dff7fc2d173e2e3bebb18ee181c7b27d9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Dec 2015 08:47:37 +0100 -Subject: [PATCH] add .log suffix to all log file names +Subject: [PATCH 1/2] add .log suffix to all log file names --- program/lib/Roundcube/rcube.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php -index 7388472..c2fc70f 100644 +index 3694c5c4b..ef5dcb94e 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php -@@ -1195,7 +1195,7 @@ class rcube +@@ -1246,7 +1246,7 @@ public static function write_log($name, $line) $log_dir = RCUBE_INSTALL_PATH . 'logs'; } @@ -20,3 +20,51 @@ index 7388472..c2fc70f 100644 } /** + +From 6ca4eab399adad22ed93b26c5870896425631dfa Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 27 Jun 2017 13:35:01 +0200 +Subject: [PATCH 2/2] add 'log_file_ext' configuration option + +--- + config/defaults.inc.php | 3 +++ + program/lib/Roundcube/rcube.php | 8 +++++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/config/defaults.inc.php b/config/defaults.inc.php +index e2db2b726..050803231 100644 +--- a/config/defaults.inc.php ++++ b/config/defaults.inc.php +@@ -77,6 +77,9 @@ + // set to 0 to avoid session IDs being logged. + $config['log_session_id'] = 8; + ++// Default extension used for log file name ++$config['log_file_ext'] = '.log'; ++ + // Syslog ident string to use, if using the 'syslog' log driver. + $config['syslog_id'] = 'roundcube'; + +diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php +index ef5dcb94e..401cd3f86 100644 +--- a/program/lib/Roundcube/rcube.php ++++ b/program/lib/Roundcube/rcube.php +@@ -1242,11 +1242,17 @@ public static function write_log($name, $line) + } + } + ++ if (self::$instance) { ++ $log_suf = self::$instance->config->get('log_file_ext', '.log'); ++ } else { ++ $log_suf = '.log'; ++ } ++ + if (empty($log_dir)) { + $log_dir = RCUBE_INSTALL_PATH . 'logs'; + } + +- return file_put_contents("$log_dir/$name.log", $line, FILE_APPEND) !== false; ++ return file_put_contents("$log_dir/$name$log_suf", $line, FILE_APPEND) !== false; + } + + /** diff --git a/roundcubemail-pr5820.patch b/roundcubemail-pr5820.patch new file mode 100644 index 0000000..0f5cbc5 --- /dev/null +++ b/roundcubemail-pr5820.patch @@ -0,0 +1,22 @@ +From 416eb9b80480b4e07b2868e37fb56fff966b77c7 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 27 Jun 2017 11:40:09 +0200 +Subject: [PATCH] drop ereg dependency, fix compat with PHP 7 + +--- + plugins/password/drivers/cpanel_webmail.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/password/drivers/cpanel_webmail.php b/plugins/password/drivers/cpanel_webmail.php +index a34b6a1f8..8aabd3c6c 100644 +--- a/plugins/password/drivers/cpanel_webmail.php ++++ b/plugins/password/drivers/cpanel_webmail.php +@@ -41,7 +41,7 @@ public function save($curpas, $newpass) + { + $user = $_SESSION['username']; + $userpwd = "$user:$curpas"; +- list($login) = split('@', $user); ++ list($login) = explode('@', $user); + + $data = array( + 'email' => $login, diff --git a/roundcubemail.spec b/roundcubemail.spec index 3cb0f53..d9722c7 100644 --- a/roundcubemail.spec +++ b/roundcubemail.spec @@ -1,3 +1,4 @@ +# # Fedora spec file for roundcubemail # # License: MIT @@ -6,18 +7,20 @@ # Please preserve changelog entries # + %if 0%{?fedora} >= 21 # support for apache / nginx / php-fpm %global with_phpfpm 1 %else %global with_phpfpm 0 %endif +#global prever rc %global roundcubedir %{_datadir}/roundcubemail %global _logdir /var/log Name: roundcubemail -Version: 1.2.5 -Release: 1%{?dist} +Version: 1.3.0 +Release: 2%{?dist} Summary: Round Cube Webmail is a browser-based multilingual IMAP client Group: Applications/System @@ -34,14 +37,12 @@ Group: Applications/System # http://www.tinymce.com/ License: GPLv3+ with exceptions and GPLv3+ and GPLv2 and LGPLv2+ and CC-BY-SA and (MIT or GPLv2) URL: http://www.roundcube.net -Source0: https://github.com/roundcube/roundcubemail/releases/download/%{version}/roundcubemail-%{version}.tar.gz +Source0: https://github.com/roundcube/roundcubemail/releases/download/%{version}%{?prever:-%{prever}}/roundcubemail-%{version}%{?prever:-%{prever}}-complete.tar.gz + Source1: roundcubemail.httpd Source3: roundcubemail.nginx 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.1-no_swf.patch +Source4: roundcubemail-README-rpm.txt # Non-upstreamable: Adjusts config path to Fedora policy Patch1: roundcubemail-1.2.1-confpath.patch @@ -50,8 +51,28 @@ Patch1: roundcubemail-1.2.1-confpath.patch # see https://github.com/roundcube/roundcubemail/pull/313 Patch2: roundcubemail-pr313.patch +# Fix PHP 7 compatibility +# see https://github.com/roundcube/roundcubemail/pull/5820 +Patch3: roundcubemail-pr5820.patch + BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) +# For test +BuildRequires: php-cli +BuildRequires: php-pear(PEAR) >= 1.10.1 +BuildRequires: php-pear(Net_Socket) >= 1.2.1 +BuildRequires: php-pear(Auth_SASL) >= 1.1.0 +BuildRequires: php-pear(Net_IDNA2) >= 0.2.0 +BuildRequires: php-pear(Mail_Mime) >= 1.10.0 +BuildRequires: php-pear(Net_SMTP) >= 1.7.1 +BuildRequires: php-pear(Crypt_GPG) >= 1.6.0 +BuildRequires: php-pear(Net_Sieve) >= 1.4.0 +BuildRequires: php-composer(endroid/qrcode) < 2 +BuildRequires: php-composer(endroid/qrcode) >= 1.6.5 +BuildRequires: php-pear(Net_LDAP2) >= 2.2.0 +BuildRequires: php-composer(kolab/Net_LDAP3) +BuildRequires: php-composer(fedora/autoloader) + + %if %{with_phpfpm} Requires: webserver Requires: nginx-filesystem @@ -65,6 +86,7 @@ Requires: php-curl Requires: php-date Requires: php-dom Requires: php-fileinfo +Requires: php-filter Requires: php-gd Requires: php-hash Requires: php-iconv @@ -74,7 +96,6 @@ Requires: php-ldap Requires: php-mbstring Requires: php-openssl Requires: php-pcre -Requires: php-posix Requires: php-pdo Requires: php-pspell Requires: php-session @@ -83,50 +104,67 @@ Requires: php-sockets Requires: php-spl Requires: php-xml # From composer.json-dist, require -# "php": ">=5.3.7", +# "php": ">=5.4.0", # "pear/pear-core-minimal": "~1.10.1", +# "pear/net_socket": "~1.2.1", +# "pear/auth_sasl": "~1.1.0", +# "pear/net_idna2": "~0.2.0", +# "pear/mail_mime": "~1.10.0", +# "pear/net_smtp": "~1.7.1", +# "pear/crypt_gpg": "~1.6.0", +# "pear/net_sieve": "~1.4.0", # "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", -# "roundcube/net_sieve": "~1.5.0" +# "endroid/qrcode": "~1.6.5" # 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(Net_Socket) >= 1.2.1 +Requires: php-pear(Auth_SASL) >= 1.1.0 +Requires: php-pear(Net_IDNA2) >= 0.2.0 Requires: php-pear(Mail_Mime) >= 1.10.0 Requires: php-pear(Net_SMTP) >= 1.7.1 -Requires: php-pear(Crypt_GPG) >= 1.4.2 -Requires: php-composer(roundcube/net_sieve) >= 1.5.0 +Requires: php-pear(Crypt_GPG) >= 1.6.0 +Requires: php-pear(Net_Sieve) >= 1.4.0 +Requires: php-composer(endroid/qrcode) < 2 +Requires: php-composer(endroid/qrcode) >= 1.6.5 # From composer.json-dist, suggest -# "pear-pear.php.net/net_ldap2": "~2.2.0 required for connecting to LDAP address books", -# "kolab/Net_LDAP3": "dev-master required for connecting to LDAP address books" +# "pear/net_ldap2": "~2.2.0 required for connecting to LDAP", +# "kolab/Net_LDAP3": "dev-master required for connecting to LDAP" Requires: php-pear(Net_LDAP2) >= 2.2.0 Requires: php-composer(kolab/Net_LDAP3) # mailcap for /etc/mime.types Requires: mailcap +# Autoloader +Requires: php-composer(fedora/autoloader) -# Optional deps -# Spell check -#Suggests: php-enchant -# Caching -#Suggests: php-apc -#Suggests: php-memcache # EXIF images -#Suggests: php-exif +Requires: php-exif # Upload progress (shock!) #Suggests: php-uploadprogress # ZIP download plugin -#Suggests: php-zip +Requires: php-zip +%if 0%{?fedora} >= 21 +# Optional deps +# Spell check +Suggests: php-enchant +# Caching +Suggests: php-apc +Suggests: php-memcache +Suggests: php-redis # Gearman support -#Optional: php-gearman +Suggests: php-gearman # PAM password support #Optional: php-pam +%endif + +# Bundled JS libraries +# see https://github.com/roundcube/roundcubemail/blob/master/jsdeps.json +Provides: bundled(js-jquery) = 3.2.1 +Provides: bundled(js-jstz) = 1.0.6 +Provides: bundled(js-publickey) +Provides: bundled(js-tinymce) = 4.5.7 +Provides: bundled(js-openpgp) = 1.6.2 +Provides: bundled(js-codemirror) = 5.21.0 %description @@ -141,28 +179,17 @@ CSS 2. %prep -%setup -q -n roundcubemail-%{version} -%patch0 -p1 +%setup -q -n roundcubemail-%{version}%{?prever:-%{prever}} %patch1 -p1 %patch2 -p1 +%patch3 -p1 # fix permissions and remove any .htaccess files find . -type f -print | xargs chmod a-x find . -name \.htaccess -print | xargs rm -f -# Fix shebang -chmod +x bin/*sh -sed -e '/^#!/s:/usr/bin/env php:/usr/bin/php:' \ - -i bin/*sh - -# ??? - Jon, this could do with a comment; fixing carriage returns? (adamw) -sed -i 's/\r//' SQL/mssql.initial.sql - -# Drop precompiled flash -find . -type f -name '*.swf' | xargs rm -f - # drop file from patch -find . -type f -name '*.orig' | xargs rm -f +find . -type f -name '*.orig' -exec rm {} \; -print # Wipe bbcode plugin from bundled TinyMCE to make doubleplus sure we cannot # be vulnerable to CVE-2012-4230, unaddressed upstream @@ -170,19 +197,19 @@ echo "CVE-2012-4230: removing tinymce bbcode plugin, check path if this fails." test -d program/js/*mce/plugins/bbcode && rm -rf program/js/*mce/plugins/bbcode || exit 1 # Create simple autoloader for PEAR -mkdir vendor +rm -r vendor/* cat << EOF | tee vendor/autoload.php - 1.3.0-2 +- update to 1.3.0 +- open https://github.com/roundcube/roundcubemail/pull/5820 - PHP 7 +- add dependency on endroid/qrcode +- raise dependency on Net_Socket 1.2.1 +- raise dependency on Auth_SASL 1.1.0 +- raise dependency on Net_IDNA2 0.2.0 +- raise dependency on Crypt_GPG 1.6.0 +- switch from roundcube/net_sieve to pear/Net_Sieve +- switch to fedora/autoloader +- add weak dependencies for optional components +- use upstream complete archive for JS libraries +- add a minimal %%check for our autoloader + * Fri Apr 28 2017 Remi Collet - 1.2.5-1 - update to 1.2.5 diff --git a/sources b/sources index a358b19..9c5784b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (roundcubemail-1.2.5.tar.gz) = 8f17c8222a59123e438a3683e5f2fbfef28c966899a271a2a11c25535e7188ff57846847108190a4d20ff53eccd10a2a7e88e8a5f958e9bc38c69e53824e7928 +SHA512 (roundcubemail-1.3.0-complete.tar.gz) = 640c654569decb6a532daff868e8e8efa40f5b336008d26504fb50196d3e46c1b788ccbe32925d0257e2ba1a26218b7d42aa4782af9bafd20b1f93d748f76be4