From aca2c93839c9d462f93dea0e09049b10a72386fa Mon Sep 17 00:00:00 2001 From: raghunayyar Date: Fri, 3 May 2013 16:31:18 +0530 Subject: [PATCH 001/112] Removes Borders from the left navigation. --- core/css/styles.css | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 6c9d00114a..670942738f 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -500,12 +500,6 @@ div.crumb:active { /* special rules for first-level entries and folders */ #app-navigation > ul > li { background-color: #eee; - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; -} -#app-navigation > ul > .active { - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; } #app-navigation .with-icon a { @@ -527,10 +521,6 @@ div.crumb:active { #app-navigation li:hover > a { background-color: #ddd; } -#app-navigation > ul > li:hover { - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} #app-navigation .collapse { display: none; /* hide collapse button intially */ @@ -592,7 +582,6 @@ div.crumb:active { #app-navigation > ul .open:hover { -moz-box-shadow: inset 0 0 3px #ccc; -webkit-box-shadow: inset 0 0 3px #ccc; box-shadow: inset 0 0 3px #ccc; - border-top: 1px solid #ccc; } #app-navigation > ul .open ul { From 7eb6e8d5b58013661c8dca9d4f1cc34c1565816a Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 9 Jul 2013 19:37:22 +0200 Subject: [PATCH 002/112] app styles: remove bottom padding. Settings should be last in list instead of permanent --- core/css/styles.css | 1 - 1 file changed, 1 deletion(-) diff --git a/core/css/styles.css b/core/css/styles.css index 670942738f..154f73f27a 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -475,7 +475,6 @@ div.crumb:active { width: 250px; height: 100%; float: left; - padding-bottom: 32px; -moz-box-sizing: border-box; box-sizing: border-box; background-color: #f8f8f8; border-right: 1px solid #ccc; From 87d1e72f9c9c4afc11f302409e00ff6825a9f5ef Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 9 Jul 2013 20:19:25 +0200 Subject: [PATCH 003/112] more whitespace WIP --- core/css/styles.css | 63 +++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 154f73f27a..1eb55aea78 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -148,7 +148,7 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b #content { position:relative; height:100%; width:100%; } #content .hascontrols { position: relative; top: 2.9em; } #content-wrapper { - position:absolute; height:100%; width:100%; padding-top:3.5em; padding-left:64px; + position:absolute; height:100%; width:100%; padding-top:3.5em; padding-left:80px; -moz-box-sizing:border-box; box-sizing:border-box; } #leftcontent, .leftcontent { @@ -274,16 +274,29 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac /* NAVIGATION ------------------------------------------------------------- */ #navigation { - position:fixed; float:left; width:64px; padding-top:3.5em; z-index:75; height:100%; + position: fixed; + float: left; + width: 80px; + padding-top: 3.5em; + z-index: 75; + height: 100%; background:#383c43 url('../img/noise.png') repeat; -moz-box-shadow:0 0 7px #000; -webkit-box-shadow:0 0 7px #000; box-shadow:0 0 7px #000; overflow:hidden; box-sizing:border-box; -moz-box-sizing:border-box; } -#navigation:hover { overflow-y:auto; } /* show scrollbar only on hover */ +#navigation:hover { + overflow-y: auto; /* show scrollbar only on hover */ +} +#navigation li { + padding: 6px 0; /* some whitespace between apps */ +} #navigation a span { - display:block; - text-decoration:none; font-size:10px; text-align:center; - color:#fff; text-shadow:#000 0 -1px 0; + display: block; + text-decoration: none; + font-size: 11px; + text-align: center; + color: #fff; + text-shadow: #000 0 -1px 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; /* ellipsize long app names */ } @@ -309,12 +322,12 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac filter: alpha(opacity=100); opacity: 1; } - - /* positioning */ #navigation .icon { - display:block; - width:32px; height:32px; - margin:0 16px 0; padding:8px 0 4px; + display: block; + width: 32px; + height: 32px; + margin-left: 24px; + padding: 8px 0 4px; } #navigation li:first-child a { padding-top:16px; } @@ -472,7 +485,7 @@ div.crumb:active { /* Navigation: folder like structure */ #app-navigation { - width: 250px; + width: 300px; height: 100%; float: left; -moz-box-sizing: border-box; box-sizing: border-box; @@ -491,7 +504,8 @@ div.crumb:active { text-shadow: 0 1px 0 rgba(255,255,255,.9); } #app-navigation .active, -#app-navigation .active a { /* active navigation entry or folder */ +#app-navigation .active a, +#app-navigation li:hover > a { background-color: #ddd; text-shadow: 0 1px 0 rgba(255,255,255,.7); } @@ -502,36 +516,35 @@ div.crumb:active { } #app-navigation .with-icon a { - padding-left: 32px; - background-size: 16px 16px; background-position: 10px center; background-repeat: no-repeat; + padding-left: 44px; + background-size: 16px 16px; + background-position: 14px center; + background-repeat: no-repeat; } #app-navigation li > a { display: block; width: 100%; - padding: 0 16px; + height: 44px; + padding-top: 12px; overflow: hidden; -moz-box-sizing: border-box; box-sizing: border-box; - line-height: 32px; white-space: nowrap; text-overflow: ellipsis; color: #333; } -#app-navigation li:hover > a { - background-color: #ddd; -} #app-navigation .collapse { display: none; /* hide collapse button intially */ } #app-navigation .collapsible > .collapse { position: absolute; - left: 6px; - top: 5px; - height: 16px; - width: 16px; + height: 44px; + width: 44px; + margin: 0; + padding: 0; background: none; background-image: url('../img/actions/triangle-s.svg'); - background-size: 16px 16px; background-repeat: no-repeat; + background-size: 16px 16px; background-repeat: no-repeat; background-position: center; border: none; border-radius: 0; outline: none !important; From a5c84768f163cad6afff6ddd6c4bd30ad53a3a86 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 9 Jul 2013 20:59:19 +0200 Subject: [PATCH 004/112] more whitespace WIP 2 --- core/css/styles.css | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 1eb55aea78..6499f454f9 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -482,6 +482,9 @@ div.crumb:active { height: 100%; width: 100%; } +#app * { + -moz-box-sizing: border-box; box-sizing: border-box; +} /* Navigation: folder like structure */ #app-navigation { @@ -526,7 +529,7 @@ div.crumb:active { display: block; width: 100%; height: 44px; - padding-top: 12px; + padding: 12px; overflow: hidden; -moz-box-sizing: border-box; box-sizing: border-box; white-space: nowrap; @@ -544,7 +547,7 @@ div.crumb:active { margin: 0; padding: 0; background: none; background-image: url('../img/actions/triangle-s.svg'); - background-size: 16px 16px; background-repeat: no-repeat; background-position: center; + background-size: 16px; background-repeat: no-repeat; background-position: center; border: none; border-radius: 0; outline: none !important; @@ -600,6 +603,23 @@ div.crumb:active { display: block; } + +/* counter and actions */ +#app-navigation .utils { + position: absolute; + right: 0; + top: 0; + bottom: 0; + font-size: 12px; +} + #app-navigation .utils button, + #app-navigation .utils .counter { + width: 44px; + height: 44px; + padding-top: 12px; + } + + /* drag and drop */ #app-navigation .drag-and-drop { -moz-transition: padding-bottom 500ms ease 0s; @@ -627,7 +647,7 @@ div.crumb:active { /* settings area */ #app-settings { position: fixed; - width: 249px; + width: 299px; bottom: 0; border-top: 1px solid #ccc; } From 583d0685900aefdfce4f02eb4cc5783efbca2339 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 9 Jul 2013 21:21:29 +0200 Subject: [PATCH 005/112] more small whitespace fixes for the app list --- core/css/styles.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 6499f454f9..c33254856a 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -287,9 +287,6 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac #navigation:hover { overflow-y: auto; /* show scrollbar only on hover */ } -#navigation li { - padding: 6px 0; /* some whitespace between apps */ -} #navigation a span { display: block; text-decoration: none; @@ -298,6 +295,7 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac color: #fff; text-shadow: #000 0 -1px 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; /* ellipsize long app names */ + padding-bottom: 10px; } /* icon opacity and hover effect */ @@ -327,9 +325,11 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac width: 32px; height: 32px; margin-left: 24px; - padding: 8px 0 4px; + padding: 10px 0 4px; + } + #navigation li:first-child .icon { /* special rule for Files icon as it's first */ + padding-top: 20px; } - #navigation li:first-child a { padding-top:16px; } /* USER MENU */ From bbad1ad21ef703ccc8b230dfd79b83f76ab16d41 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 9 Jul 2013 21:57:47 +0200 Subject: [PATCH 006/112] more whitespace for user menu --- core/css/styles.css | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index c33254856a..97ab62df0a 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -343,13 +343,28 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac background:#383c43 url('../img/noise.png') repeat; border-bottom-left-radius:7px; border-bottom:1px #333 solid; border-left:1px #333 solid; -moz-box-shadow:0 0 7px rgb(29,45,68); -webkit-box-shadow:0 0 7px rgb(29,45,68); box-shadow:0 0 7px rgb(29,45,68); + -moz-box-sizing: border-box; box-sizing: border-box; } #expanddiv a { - display:block; color:#fff; text-shadow:0 -1px 0 #000; padding:0 8px; - -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70);opacity:.7; + display: block; + height: 40px; + color: #fff; + text-shadow: 0 -1px 0 #000; + padding: 4px 12px 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; + filter: alpha(opacity=70); + opacity: .7; + -moz-box-sizing: border-box; box-sizing: border-box; + } + #expanddiv a img { + margin-bottom: -3px; + margin-right: 6px; + } + #expanddiv a:hover, #expanddiv a:focus, #expanddiv a:active { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); + opacity: 1; } - #expanddiv a img { margin-bottom:-3px; } - #expanddiv a:hover, #expanddiv a:focus, #expanddiv a:active { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } /* VARIOUS REUSABLE SELECTORS */ From b44cab5acc1adccf36ebd18ab7f4da9caf4c7932 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 9 Jul 2013 22:02:39 +0200 Subject: [PATCH 007/112] prevent ugly selection effect on accidental selection, fix #3713 --- core/css/styles.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/css/styles.css b/core/css/styles.css index 97ab62df0a..89c074aabb 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -283,6 +283,8 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac background:#383c43 url('../img/noise.png') repeat; -moz-box-shadow:0 0 7px #000; -webkit-box-shadow:0 0 7px #000; box-shadow:0 0 7px #000; overflow:hidden; box-sizing:border-box; -moz-box-sizing:border-box; + /* prevent ugly selection effect on accidental selection */ + -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #navigation:hover { overflow-y: auto; /* show scrollbar only on hover */ @@ -344,6 +346,8 @@ li.update, li.error { width:640px; margin:4em auto; padding:1em 1em 1em 4em; bac border-bottom-left-radius:7px; border-bottom:1px #333 solid; border-left:1px #333 solid; -moz-box-shadow:0 0 7px rgb(29,45,68); -webkit-box-shadow:0 0 7px rgb(29,45,68); box-shadow:0 0 7px rgb(29,45,68); -moz-box-sizing: border-box; box-sizing: border-box; + /* prevent ugly selection effect on accidental selection */ + -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #expanddiv a { display: block; From cab792323d4c136ed336442d7ae6bb9559955591 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 18 Jul 2013 18:31:56 +0200 Subject: [PATCH 008/112] make delete icon less intrusive again, only on hover --- core/css/styles.css | 4 ++++ core/img/actions/delete-hover.png | Bin 0 -> 295 bytes core/img/actions/delete-hover.svg | 12 ++++++++++++ core/img/actions/delete.png | Bin 295 -> 254 bytes core/img/actions/delete.svg | 14 ++++---------- 5 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 core/img/actions/delete-hover.png create mode 100644 core/img/actions/delete-hover.svg diff --git a/core/css/styles.css b/core/css/styles.css index ca2d082eb3..94520a4e0c 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -661,8 +661,12 @@ div.crumb:active { /* icons */ .folder-icon { background-image: url('../img/places/folder.svg'); } .delete-icon { background-image: url('../img/actions/delete.svg'); } +.delete-icon:hover, .delete-icon:focus { + background-image: url('../img/actions/delete-hover.svg'); +} .edit-icon { background-image: url('../img/actions/rename.svg'); } + /* buttons */ button.loading { background-image: url('../img/loading.gif'); diff --git a/core/img/actions/delete-hover.png b/core/img/actions/delete-hover.png new file mode 100644 index 0000000000000000000000000000000000000000..99f549faf9b70be5d0917d601485170bfae526d8 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFwM+{iL7^mG#D7zGPR!nT&$J|w1L6X L)z4*}Q$iB}Wn^OS literal 0 HcmV?d00001 diff --git a/core/img/actions/delete-hover.svg b/core/img/actions/delete-hover.svg new file mode 100644 index 0000000000..568185c5c7 --- /dev/null +++ b/core/img/actions/delete-hover.svg @@ -0,0 +1,12 @@ + + + + + image/svg+xml + + + + + + + diff --git a/core/img/actions/delete.png b/core/img/actions/delete.png index 99f549faf9b70be5d0917d601485170bfae526d8..0d8c89a56e2d88463f52bb1901ccf228640ff7a1 100644 GIT binary patch delta 153 zcmZ3^^p9~uZoOiFPl)UP|Nj~Ag1ZGN;XnmkB|(0{3|w0A2@UfXT>bjKBycHE)Y8+% zF@z&JIpF|v1h=Hb5vB&7Z=zg2v8)bk$=6fPi!v!#o()~C)+oAhP1MtdQw^R6MGtR1 d%zK2BVdr%rf!lfSkH&&5_jL7hS?83{1OP%#F82Tc delta 194 zcmeyzxSVN1ZoO83Pl)UP|Nk#CFkE6_xXQqAnStR75(0`Kb06+JX2!t4z*`dJ7tFw| zYnxfN;qKE{AOHUI6Y_`vN`!g3IEHXUCnq>CT zaLwZE-jzi$4UJ!?H9b?YUbdByC#PK9P&4D6Z^DBe)xnLK@9wg(Fzc~~^IYdM7f58i c6Qsewz?P}?{O4k|M4%N6p00i_>zopr07BGC0ssI2 diff --git a/core/img/actions/delete.svg b/core/img/actions/delete.svg index 568185c5c7..ef564bfd48 100644 --- a/core/img/actions/delete.svg +++ b/core/img/actions/delete.svg @@ -1,12 +1,6 @@ + - - - - image/svg+xml - - - - - - + + + From 197c979d264f15d82e991f45c7155b2172aae3c6 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 18 Jul 2013 18:40:09 +0200 Subject: [PATCH 009/112] use background image instead of img for Files delete icon --- apps/files/js/fileactions.js | 5 +---- core/css/styles.css | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index aa66a57a7b..bb0a27638e 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -125,12 +125,9 @@ var FileActions = { if (typeof trashBinApp !== 'undefined' && trashBinApp) { var html = ''; } else { - var html = ''; + var html = ''; } var element = $(html); - if (img) { - element.append($('')); - } element.data('action', actions['Delete']); element.on('click', {a: null, elem: parent, actionFunc: actions['Delete']}, actionHandler); parent.parent().children().last().append(element); diff --git a/core/css/styles.css b/core/css/styles.css index 94520a4e0c..46972331df 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -659,6 +659,10 @@ div.crumb:active { } /* icons */ +.folder-icon, .delete-icon, .edit-icon { + background-repeat: no-repeat; + background-position: center; +} .folder-icon { background-image: url('../img/places/folder.svg'); } .delete-icon { background-image: url('../img/actions/delete.svg'); } .delete-icon:hover, .delete-icon:focus { From 8a25d1ad068b67914ae87159e062c28433a3a789 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 18 Jul 2013 18:41:01 +0200 Subject: [PATCH 010/112] remove unnecessary tipsy for Files delete --- apps/files/js/fileactions.js | 2 +- core/js/js.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index bb0a27638e..59cf007f53 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -125,7 +125,7 @@ var FileActions = { if (typeof trashBinApp !== 'undefined' && trashBinApp) { var html = ''; } else { - var html = ''; + var html = ''; } var element = $(html); element.data('action', actions['Delete']); diff --git a/core/js/js.js b/core/js/js.js index 5158b66d73..6558adbb6a 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -664,7 +664,6 @@ $(document).ready(function(){ $('.password .action').tipsy({gravity:'se', fade:true, live:true}); $('#upload').tipsy({gravity:'w', fade:true}); $('.selectedActions a').tipsy({gravity:'s', fade:true, live:true}); - $('a.delete').tipsy({gravity: 'e', fade:true, live:true}); $('a.action').tipsy({gravity:'s', fade:true, live:true}); $('#headerSize').tipsy({gravity:'s', fade:true, live:true}); $('td.filesize').tipsy({gravity:'s', fade:true, live:true}); From 4bfd61fb7fcbc6394bbf2ee83f733cd09abb63a3 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 18 Jul 2013 18:46:37 +0200 Subject: [PATCH 011/112] use new delete icon for deleted files as well --- apps/files/js/fileactions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 59cf007f53..ef82cd6346 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -123,7 +123,7 @@ var FileActions = { img = img(file); } if (typeof trashBinApp !== 'undefined' && trashBinApp) { - var html = ''; + var html = ''; } else { var html = ''; } From dba4111aa0bfd387d705391bf9d75f7f43bf1135 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Mon, 22 Jul 2013 11:18:51 +0200 Subject: [PATCH 012/112] fix delete button not showing in IE8 --- apps/files/css/files.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index f2ca1065ec..6c835a7cdd 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -147,14 +147,14 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } display:none; } #fileList tr:hover a.action, #fileList a.action.permanent { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=.5)"; - filter: alpha(opacity=.5); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); opacity: .5; display:inline; } #fileList tr:hover a.action:hover { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; - filter: alpha(opacity=1); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); opacity: 1; display:inline; } From cdb993ad69969964c433cf414b549c52b298c67d Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 23 Jul 2013 17:13:12 +0300 Subject: [PATCH 013/112] Explicit ie8 fallback --- core/css/styles.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/css/styles.css b/core/css/styles.css index 46972331df..c328804f81 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -685,3 +685,7 @@ button.loading { ::-moz-focus-inner { border: 0; /* remove dotted outlines in Firefox */ } +.lte8 .delete-icon { background-image: url('../img/actions/delete.png'); } +.lte8 .delete-icon:hover, .delete-icon:focus { + background-image: url('../img/actions/delete-hover.png'); +} \ No newline at end of file From 16d8074d77292f812234fc3b93e851e39f3a6cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 25 Jul 2013 11:15:01 +0200 Subject: [PATCH 014/112] fix css --- apps/files_versions/css/versions.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_versions/css/versions.css b/apps/files_versions/css/versions.css index 6146eda337..6f4e2ee131 100644 --- a/apps/files_versions/css/versions.css +++ b/apps/files_versions/css/versions.css @@ -39,6 +39,6 @@ float: right; } -.drop-versions #makelink { +.drop-versions #show-more-versions { float: left; } From e5b0c1e78b0e0b5cb4b49db4060e1a2fffdc172c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 25 Jul 2013 11:15:24 +0200 Subject: [PATCH 015/112] remove unused code; use jquery --- apps/files_versions/js/versions.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index ca479507d4..a14de7dbee 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -104,9 +104,9 @@ function createVersionsDropdown(filename, files) { success: function(result) { var versions = result.data.versions; if (result.data.endReached === true) { - document.getElementById("show-more-versions").style.display="none"; + $("#show-more-versions").css("display", "none"); } else { - document.getElementById("show-more-versions").style.display="block"; + $("#show-more-versions").css("display", "block"); } if (versions) { $.each(versions, function(index, row) { @@ -132,8 +132,6 @@ function createVersionsDropdown(filename, files) { download =''; download+=''; download+=name; download+=''; @@ -143,8 +141,6 @@ function createVersionsDropdown(filename, files) { revert+=' value="' + files + '">'; revert+=''+t('files_versions', 'Restore')+''; From 62f84ff79cdeebbba9bd65d97f542c59bc41911d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 25 Jul 2013 12:29:39 +0200 Subject: [PATCH 016/112] css for button no longer needed --- apps/files_versions/css/versions.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/files_versions/css/versions.css b/apps/files_versions/css/versions.css index 6f4e2ee131..db4b2fca21 100644 --- a/apps/files_versions/css/versions.css +++ b/apps/files_versions/css/versions.css @@ -39,6 +39,3 @@ float: right; } -.drop-versions #show-more-versions { - float: left; -} From 2c8e5ec84ff98088fb9e3b275735098beaa5e27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 10 Jun 2013 11:03:07 +0200 Subject: [PATCH 017/112] user interface to allow user to decrypt all his files once the encryption app was disabled Conflicts: settings/templates/personal.php --- apps/files_encryption/lib/helper.php | 27 +++++++++++++++++++++++++++ apps/files_encryption/lib/proxy.php | 6 +++--- apps/files_encryption/lib/stream.php | 14 +++++++++----- apps/files_trashbin/lib/trash.php | 2 +- settings/personal.php | 10 ++++++++++ settings/templates/personal.php | 18 ++++++++++++++++++ 6 files changed, 68 insertions(+), 9 deletions(-) diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 6eee8fed6a..f5a5d269a6 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -199,12 +199,39 @@ class Helper { public static function stripUserFilesPath($path) { $trimmed = ltrim($path, '/'); $split = explode('/', $trimmed); + + // it is not a file relative to data/user/files + if ($split[1] !== 'files') { + return false; + } + $sliced = array_slice($split, 2); $relPath = implode('/', $sliced); return $relPath; } + /** + * @brief get path to the correspondig file in data/user/files + * @param string $path path to a version or a file in the trash + * @return string path to correspondig file relative to data/user/files + */ + public static function getPathToRealFile($path) { + $trimmed = ltrim($path, '/'); + $split = explode('/', $trimmed); + + if ($split[1] !== "files_versions") { + return false; + } + + $sliced = array_slice($split, 2); + $realPath = implode('/', $sliced); + //remove the last .v + $realPath = substr($realPath, 0, strrpos($realPath, '.v')); + + return $realPath; + } + /** * @brief redirect to a error page */ diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 735eba911a..12fee750a6 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -116,7 +116,7 @@ class Proxy extends \OC_FileProxy { return true; } - $handle = fopen('crypt://' . $relativePath . '.etmp', 'w'); + $handle = fopen('crypt://' . $path . '.etmp', 'w'); if (is_resource($handle)) { // write data to stream @@ -296,14 +296,14 @@ class Proxy extends \OC_FileProxy { // Open the file using the crypto stream wrapper // protocol and let it do the decryption work instead - $result = fopen('crypt://' . $relativePath, $meta['mode']); + $result = fopen('crypt://' . $path, $meta['mode']); } elseif ( self::shouldEncrypt($path) and $meta ['mode'] !== 'r' and $meta['mode'] !== 'rb' ) { - $result = fopen('crypt://' . $relativePath, $meta['mode']); + $result = fopen('crypt://' . $path, $meta['mode']); } // Re-enable the proxy diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 3c1eb2c5f5..2f7af1410b 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -73,7 +73,7 @@ class Stream { private $privateKey; /** - * @param $path + * @param $path raw path relative to data/ * @param $mode * @param $options * @param $opened_path @@ -93,12 +93,16 @@ class Stream { $this->userId = $util->getUserId(); - // Strip identifier text from path, this gives us the path relative to data//files - $this->relPath = \OC\Files\Filesystem::normalizePath(str_replace('crypt://', '', $path)); - // rawPath is relative to the data directory - $this->rawPath = $util->getUserFilesDir() . $this->relPath; + $this->rawPath = \OC\Files\Filesystem::normalizePath(str_replace('crypt://', '', $path)); + // Strip identifier text from path, this gives us the path relative to data//files + $this->relPath = Helper::stripUserFilesPath($this->rawPath); + // if raw path doesn't point to a real file, check if it is a version or a file in the trash bin + if ($this->relPath === false) { + $this->relPath = Helper::getPathToRealFile($this->rawPath); + } + // Disable fileproxies so we can get the file size and open the source file without recursive encryption $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php index b9d900dfab..cdf8d950e6 100644 --- a/apps/files_trashbin/lib/trash.php +++ b/apps/files_trashbin/lib/trash.php @@ -693,7 +693,7 @@ class Trashbin { \OC_Log::write('files_trashbin', 'remove "' . $filename . '" fom trash bin because it is older than ' . $retention_obligation, \OC_log::INFO); } } - $availableSpace = $availableSpace + $size; + $availableSpace += $size; // if size limit for trash bin reached, delete oldest files in trash bin if ($availableSpace < 0) { $query = \OC_DB::prepare('SELECT `location`,`type`,`id`,`timestamp` FROM `*PREFIX*files_trash`' diff --git a/settings/personal.php b/settings/personal.php index 1e2e1cf672..4961661e25 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -24,6 +24,15 @@ $email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', ''); $userLang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() ); $languageCodes=OC_L10N::findAvailableLanguages(); +//check if encryption was enabled in the past +$enableDecryptAll = false; +if (OC_App::isEnabled('files_encryption') === false) { + $view = new OC\Files\View('/'.OC_User::getUser()); + if ($view->file_exists('files_encryption/keyfiles')) { + $enableDecryptAll = true; + } +} + // array of common languages $commonlangcodes = array( 'en', 'es', 'fr', 'de', 'de_DE', 'ja_JP', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'zh_CN', 'ko' @@ -80,6 +89,7 @@ $tmpl->assign('activelanguage', $userLang); $tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User::getUser())); $tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser())); $tmpl->assign('displayName', OC_User::getDisplayName()); +$tmpl->assign('enableDecryptAll' , true); $forms=OC_App::getForms('personal'); $tmpl->assign('forms', array()); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index b9d9b09f5d..c0f3600a51 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -110,6 +110,24 @@ if($_['passwordChangeSupported']) { print_unescaped($form); };?> + + + + + t( 'Encryption' ) ); ?> + + t( "The encryption app is no longer enabled, decrypt all your file" )); ?> + + t( "Decrypt all Files" )); ?> + + + + + + + t('Version'));?> getName()); ?> From e15e394fccf5dc0be8df9f6f2619214ca2326f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 10 Jun 2013 12:57:18 +0200 Subject: [PATCH 018/112] add ajax call to decrypt all files Conflicts: apps/files_encryption/lib/crypt.php --- apps/files_encryption/lib/crypt.php | 4 ++++ settings/js/personal.js | 13 +++++++++++++ settings/personal.php | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 6543a0de5f..d8d1902909 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -662,5 +662,9 @@ class Crypt { return rtrim($result, "\0"); } } + + public static function decryptAll() { + error_log("decrypt all"); + } } \ No newline at end of file diff --git a/settings/js/personal.js b/settings/js/personal.js index 099c1426dc..97342e7653 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -110,6 +110,19 @@ $(document).ready(function(){ }); return false; }); + + $('button:button[name="submitDecryptAll"]').click(function() { + console.log("click!"); + $.post('ajax/decryptall.php', {}, function(data) { + /* + if (data.status === "error") { + OC.msg.finishedSaving('#encryption .msg', data); + } else { + OC.msg.finishedSaving('#encryption .msg', data); + }*/ + } + ); + }); } ); OC.msg={ diff --git a/settings/personal.php b/settings/personal.php index 4961661e25..79ce8e4576 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -89,7 +89,7 @@ $tmpl->assign('activelanguage', $userLang); $tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User::getUser())); $tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser())); $tmpl->assign('displayName', OC_User::getDisplayName()); -$tmpl->assign('enableDecryptAll' , true); +$tmpl->assign('enableDecryptAll' , $enableDecryptAll); $forms=OC_App::getForms('personal'); $tmpl->assign('forms', array()); From 0a3d662dd0a7d1e3066a3f8781eaaaba853ce0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 10 Jun 2013 14:02:35 +0200 Subject: [PATCH 019/112] register decrypt all route --- settings/routes.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings/routes.php b/settings/routes.php index b20119b580..73ee70d1d5 100644 --- a/settings/routes.php +++ b/settings/routes.php @@ -46,6 +46,8 @@ $this->create('settings_ajax_lostpassword', '/settings/ajax/lostpassword.php') ->actionInclude('settings/ajax/lostpassword.php'); $this->create('settings_ajax_setlanguage', '/settings/ajax/setlanguage.php') ->actionInclude('settings/ajax/setlanguage.php'); +$this->create('settings_ajax_decryptall', '/settings/ajax/decryptall.php') + ->actionInclude('settings/ajax/decryptall.php'); // apps $this->create('settings_ajax_apps_ocs', '/settings/ajax/apps/ocs.php') ->actionInclude('settings/ajax/apps/ocs.php'); From 830f5d24c77b863bd49eda0cbc4ba812add8065d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 10 Jun 2013 14:04:43 +0200 Subject: [PATCH 020/112] add decryptall.php --- settings/ajax/decryptall.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 settings/ajax/decryptall.php diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php new file mode 100644 index 0000000000..02a9bfe96b --- /dev/null +++ b/settings/ajax/decryptall.php @@ -0,0 +1,14 @@ + array('message' => 'looks good'))); + From b6fa0e4eefb332dc1fb9b45df50de4621ed8e6bd Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 29 Jul 2013 17:06:05 +0200 Subject: [PATCH 021/112] working decrypt files method --- apps/files_encryption/hooks/hooks.php | 13 +--- apps/files_encryption/lib/util.php | 102 ++++++++++++++++++++++++-- settings/ajax/decryptall.php | 23 ++++-- settings/js/personal.js | 57 ++++++++++++-- settings/personal.php | 5 +- settings/templates/personal.php | 10 ++- 6 files changed, 173 insertions(+), 37 deletions(-) diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index b2a17f6bca..d9c3f49b73 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -62,18 +62,7 @@ class Hooks { return false; } - $encryptedKey = Keymanager::getPrivateKey($view, $params['uid']); - - $privateKey = Crypt::decryptPrivateKey($encryptedKey, $params['password']); - - if ($privateKey === false) { - \OCP\Util::writeLog('Encryption library', 'Private key for user "' . $params['uid'] - . '" is not valid! Maybe the user password was changed from outside if so please change it back to gain access', \OCP\Util::ERROR); - } - - $session = new \OCA\Encryption\Session($view); - - $session->setPrivateKey($privateKey); + $session = $util->initEncryption($params); // Check if first-run file migration has already been performed $ready = false; diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 50e823585d..03e2fae4c6 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -661,6 +661,69 @@ class Util { } } + + /** + * @brief Decrypt all files + * @return bool + */ + public function decryptAll() { + + $found = $this->findEncFiles($this->userId . '/files'); + + if ($found) { + + // Disable proxy to prevent file being encrypted twice + \OC_FileProxy::$enabled = false; + + // Encrypt unencrypted files + foreach ($found['encrypted'] as $encryptedFile) { + + //relative to data//file + $relPath = Helper::stripUserFilesPath($encryptedFile['path']); + + //relative to /data + $rawPath = $encryptedFile['path']; + + // Open enc file handle for binary reading + $encHandle = fopen('crypt://' . $rawPath, 'rb'); + + // Open plain file handle for binary writing, with same filename as original plain file + $plainHandle = $this->view->fopen($rawPath . '.part', 'wb'); + + // Move plain file to a temporary location + $size = stream_copy_to_stream($encHandle, $plainHandle); + + fclose($encHandle); + fclose($plainHandle); + + $fakeRoot = $this->view->getRoot(); + $this->view->chroot('/' . $this->userId . '/files'); + + $this->view->rename($relPath . '.part', $relPath); + + $this->view->chroot($fakeRoot); + + // Add the file to the cache + \OC\Files\Filesystem::putFileInfo($relPath, array( + 'encrypted' => false, + 'size' => $size, + 'unencrypted_size' => $size + )); + } + + $this->view->deleteAll($this->keyfilesPath); + $this->view->deleteAll($this->shareKeysPath); + + \OC_FileProxy::$enabled = true; + + // If files were found, return true + return true; + } else { + + // If no files were found, return false + return false; + } + } /** * @brief Encrypt all files in a directory @@ -672,7 +735,9 @@ class Util { */ public function encryptAll($dirPath, $legacyPassphrase = null, $newPassphrase = null) { - if ($found = $this->findEncFiles($dirPath)) { + $found = $this->findEncFiles($dirPath); + + if ($found) { // Disable proxy to prevent file being encrypted twice \OC_FileProxy::$enabled = false; @@ -690,12 +755,13 @@ class Util { $plainHandle = $this->view->fopen($rawPath, 'rb'); // Open enc file handle for binary writing, with same filename as original plain file - $encHandle = fopen('crypt://' . $relPath . '.part', 'wb'); + $encHandle = fopen('crypt://' . $rawPath . '.part', 'wb'); // Move plain file to a temporary location $size = stream_copy_to_stream($plainHandle, $encHandle); fclose($encHandle); + fclose($plainHandle); $fakeRoot = $this->view->getRoot(); $this->view->chroot('/' . $this->userId . '/files'); @@ -706,10 +772,10 @@ class Util { // Add the file to the cache \OC\Files\Filesystem::putFileInfo($relPath, array( - 'encrypted' => true, - 'size' => $size, - 'unencrypted_size' => $size - )); + 'encrypted' => true, + 'size' => $size, + 'unencrypted_size' => $size + )); } // Encrypt legacy encrypted files @@ -1579,4 +1645,28 @@ class Util { return false; } + /** + * @brief decrypt private key and add it to the current session + * @param array $params with 'uid' and 'password' + * @return mixed session or false + */ + public function initEncryption($params) { + + $encryptedKey = Keymanager::getPrivateKey($this->view, $params['uid']); + + $privateKey = Crypt::decryptPrivateKey($encryptedKey, $params['password']); + + if ($privateKey === false) { + \OCP\Util::writeLog('Encryption library', 'Private key for user "' . $params['uid'] + . '" is not valid! Maybe the user password was changed from outside if so please change it back to gain access', \OCP\Util::ERROR); + return false; + } + + $session = new \OCA\Encryption\Session($this->view); + + $session->setPrivateKey($privateKey); + + return $session; + } + } diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php index 02a9bfe96b..7adacb9802 100644 --- a/settings/ajax/decryptall.php +++ b/settings/ajax/decryptall.php @@ -1,14 +1,21 @@ \OCP\User::getUser(), + 'password' => $_POST['password']); -OCA\Encryption\Crypt::decryptAll(); +$view = new OC_FilesystemView('/'); +$util = new \OCA\Encryption\Util($view, \OCP\User::getUser()); -if ($status === false) { - OC_App::disable('files_encryption'); +$result = $util->initEncryption($params); + +if ($result !== false) { + $util->decryptAll(); + \OCP\JSON::success(array('data' => array('message' => 'Files decrypted successfully'))); +} else { + \OCP\JSON::error(array('data' => array('message' => 'Couldn\'t decrypt files, check your password and try again'))); } - -\OCP\JSON::success(array('data' => array('message' => 'looks good'))); - diff --git a/settings/js/personal.js b/settings/js/personal.js index 97342e7653..94ef959488 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -112,18 +112,59 @@ $(document).ready(function(){ }); $('button:button[name="submitDecryptAll"]').click(function() { - console.log("click!"); - $.post('ajax/decryptall.php', {}, function(data) { - /* + var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val(); + OC.Encryption.decryptAll(privateKeyPassword); + }); + + $('#decryptAll input:password[name="privateKeyPassword"]').keyup(function(event) { + var privateKeyPassword = $('#decryptAll input:password[id="privateKeyPassword"]').val(); + if (privateKeyPassword !== '' ) { + $('#decryptAll button:button[name="submitDecryptAll"]').removeAttr("disabled"); + if(event.which === 13) { + OC.Encryption.decryptAll(privateKeyPassword); + } + } else { + $('#decryptAll button:button[name="submitDecryptAll"]').attr("disabled", "true"); + } + }); + +} ); + +OC.Encryption = { + decryptAll: function(password) { + OC.Encryption.msg.startDecrypting('#decryptAll .msg'); + $.post('ajax/decryptall.php', {password:password}, function(data) { if (data.status === "error") { - OC.msg.finishedSaving('#encryption .msg', data); + OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data); } else { - OC.msg.finishedSaving('#encryption .msg', data); - }*/ + OC.Encryption.msg.finishedDecrypting('#decryptAll .msg', data); + } } ); - }); -} ); + } +} + +OC.Encryption.msg={ + startDecrypting:function(selector){ + $(selector) + .html( t('files_encryption', 'Decrypting files... Please wait, this can take some time.') ) + .removeClass('success') + .removeClass('error') + .stop(true, true) + .show(); + }, + finishedDecrypting:function(selector, data){ + if( data.status === "success" ){ + $(selector).html( data.data.message ) + .addClass('success') + .stop(true, true) + .delay(3000) + .fadeOut(900); + }else{ + $(selector).html( data.data.message ).addClass('error'); + } + } +}; OC.msg={ startSaving:function(selector){ diff --git a/settings/personal.php b/settings/personal.php index 79ce8e4576..f10b0afb09 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -27,8 +27,9 @@ $languageCodes=OC_L10N::findAvailableLanguages(); //check if encryption was enabled in the past $enableDecryptAll = false; if (OC_App::isEnabled('files_encryption') === false) { - $view = new OC\Files\View('/'.OC_User::getUser()); - if ($view->file_exists('files_encryption/keyfiles')) { + $view = new OC\Files\View('/'.OCP\User::getUser()); + $remainingKeys = $view->getDirectoryContent('/files_encryption/keyfiles'); + if (!empty($remainingKeys)) { $enableDecryptAll = true; } } diff --git a/settings/templates/personal.php b/settings/templates/personal.php index c0f3600a51..7e926ea42b 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -111,17 +111,25 @@ if($_['passwordChangeSupported']) { };?> - + t( 'Encryption' ) ); ?> t( "The encryption app is no longer enabled, decrypt all your file" )); ?> + + t( "Log-in password" )); ?> + t( "Decrypt all Files" )); ?> + From 33fe24dc3d12868d79f9b137e9e91eba2b3e5028 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Mon, 29 Jul 2013 19:27:11 +0300 Subject: [PATCH 022/112] Replace delete icon with spinner --- apps/files/js/filelist.js | 8 +++----- core/css/styles.css | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 04a9fb9164..dc820dc93e 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -371,9 +371,7 @@ var FileList={ } for (var i=0; i'; - deleteAction.html(newHTML); + deleteAction.removeClass('delete-icon').addClass('progress-icon'); } // Finish any existing actions if (FileList.lastAction) { @@ -394,8 +392,8 @@ var FileList={ procesSelection(); } else { $.each(files,function(index,file) { - var deleteAction = $('tr').filterAttr('data-file',file).children("td.date").children(".move2trash"); - deleteAction.html(oldHTML); + var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete"); + deleteAction.removeClass('progress-icon').addClass('delete-icon'); }); } }); diff --git a/core/css/styles.css b/core/css/styles.css index 490619c00d..365de759fd 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -659,7 +659,7 @@ div.crumb:active { } /* icons */ -.folder-icon, .delete-icon, .edit-icon { +.folder-icon, .delete-icon, .edit-icon, .progress-icon { background-repeat: no-repeat; background-position: center; } @@ -669,7 +669,7 @@ div.crumb:active { background-image: url('../img/actions/delete-hover.svg'); } .edit-icon { background-image: url('../img/actions/rename.svg'); } - +.progress-icon { background-image: url('../img/loading.gif'); } /* buttons */ button.loading { From a7a7ef2b3a79607677679ea96212a20a633065e3 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 09:48:30 +0200 Subject: [PATCH 023/112] improved error handling --- apps/files_encryption/lib/util.php | 36 +++++++++++++++++++++--------- settings/ajax/decryptall.php | 12 ++++++---- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 03e2fae4c6..5649472e0b 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -661,7 +661,7 @@ class Util { } } - + /** * @brief Decrypt all files * @return bool @@ -670,6 +670,8 @@ class Util { $found = $this->findEncFiles($this->userId . '/files'); + $successful = true; + if ($found) { // Disable proxy to prevent file being encrypted twice @@ -687,11 +689,28 @@ class Util { // Open enc file handle for binary reading $encHandle = fopen('crypt://' . $rawPath, 'rb'); + if ($encHandle === false) { + \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $rawPath . '", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } + // Open plain file handle for binary writing, with same filename as original plain file $plainHandle = $this->view->fopen($rawPath . '.part', 'wb'); + if ($plainHandle === false) { + \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $rawPath . '.part", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } // Move plain file to a temporary location $size = stream_copy_to_stream($encHandle, $plainHandle); + if ($size === 0) { + \OCP\Util::writeLog('Encryption library', 'Zero bytes copied of "' . $rawPath . '", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } + fclose($encHandle); fclose($plainHandle); @@ -711,18 +730,15 @@ class Util { )); } - $this->view->deleteAll($this->keyfilesPath); - $this->view->deleteAll($this->shareKeysPath); + if ($successful) { + $this->view->deleteAll($this->keyfilesPath); + $this->view->deleteAll($this->shareKeysPath); + } \OC_FileProxy::$enabled = true; - - // If files were found, return true - return true; - } else { - - // If no files were found, return false - return false; } + + return $successful; } /** diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php index 7adacb9802..e53067931e 100644 --- a/settings/ajax/decryptall.php +++ b/settings/ajax/decryptall.php @@ -1,5 +1,5 @@ initEncryption($params); if ($result !== false) { - $util->decryptAll(); - \OCP\JSON::success(array('data' => array('message' => 'Files decrypted successfully'))); + $successful = $util->decryptAll(); + if ($successful === true) { + \OCP\JSON::success(array('data' => array('message' => 'Files decrypted successfully'))); + } else { + \OCP\JSON::error(array('data' => array('message' => 'Couldn\'t decrypt your files, please check your owncloud.log or ask your administrator'))); + } } else { - \OCP\JSON::error(array('data' => array('message' => 'Couldn\'t decrypt files, check your password and try again'))); + \OCP\JSON::error(array('data' => array('message' => 'Couldn\'t decrypt your files, check your password and try again'))); } From 223d3c91d681fbbbbcfa83bac4ddc694c71c498b Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 10:14:17 +0200 Subject: [PATCH 024/112] use path relative to data/ --- apps/files_encryption/lib/proxy.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 12fee750a6..eb7ba60cb9 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -154,9 +154,6 @@ class Proxy extends \OC_FileProxy { $plainData = null; $view = new \OC_FilesystemView('/'); - // get relative path - $relativePath = \OCA\Encryption\Helper::stripUserFilesPath($path); - // init session $session = new \OCA\Encryption\Session($view); @@ -166,7 +163,7 @@ class Proxy extends \OC_FileProxy { && Crypt::isCatfileContent($data) ) { - $handle = fopen('crypt://' . $relativePath, 'r'); + $handle = fopen('crypt://' . $path, 'r'); if (is_resource($handle)) { while (($plainDataChunk = fgets($handle, 8192)) !== false) { From ba18452edac08485e9cf7aceba7daab750d4628a Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 10:43:16 +0200 Subject: [PATCH 025/112] only write keyfiles if it was a new file, otherwise nothing changed --- apps/files_encryption/lib/stream.php | 83 +++++++++++++++------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 2f7af1410b..d9146e75b6 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -62,6 +62,7 @@ class Stream { private $unencryptedSize; private $publicKey; private $encKeyfile; + private $newFile; // helper var, we only need to write the keyfile for new files /** * @var \OC\Files\View */ @@ -80,6 +81,9 @@ class Stream { * @return bool */ public function stream_open($path, $mode, $options, &$opened_path) { + + // assume that the file already exist before we decide it finally in getKey() + $this->newFile = false; if (!isset($this->rootView)) { $this->rootView = new \OC_FilesystemView('/'); @@ -262,6 +266,8 @@ class Stream { } else { + $this->newFile = true; + return false; } @@ -440,9 +446,7 @@ class Stream { fwrite($this->handle, $encrypted); $this->writeCache = ''; - } - } /** @@ -455,56 +459,63 @@ class Stream { // if there is no valid private key return false if ($this->privateKey === false) { - // cleanup - if ($this->meta['mode'] !== 'r' && $this->meta['mode'] !== 'rb') { + // cleanup + if ($this->meta['mode'] !== 'r' && $this->meta['mode'] !== 'rb') { - // Disable encryption proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; + // Disable encryption proxy to prevent recursive calls + $proxyStatus = \OC_FileProxy::$enabled; + \OC_FileProxy::$enabled = false; - if ($this->rootView->file_exists($this->rawPath) && $this->size === 0) { - $this->rootView->unlink($this->rawPath); - } - - // Re-enable proxy - our work is done - \OC_FileProxy::$enabled = $proxyStatus; + if ($this->rootView->file_exists($this->rawPath) && $this->size === 0) { + $this->rootView->unlink($this->rawPath); } + // Re-enable proxy - our work is done + \OC_FileProxy::$enabled = $proxyStatus; + } + // if private key is not valid redirect user to a error page \OCA\Encryption\Helper::redirectToErrorPage(); } if ( - $this->meta['mode'] !== 'r' - and $this->meta['mode'] !== 'rb' - and $this->size > 0 + $this->meta['mode'] !== 'r' && + $this->meta['mode'] !== 'rb' && + $this->size > 0 ) { - // Disable encryption proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; + // only write keyfiles if it was a new file + if ($this->newFile === true) { - // Fetch user's public key - $this->publicKey = Keymanager::getPublicKey($this->rootView, $this->userId); + // Disable encryption proxy to prevent recursive calls + $proxyStatus = \OC_FileProxy::$enabled; + \OC_FileProxy::$enabled = false; - // Check if OC sharing api is enabled - $sharingEnabled = \OCP\Share::isEnabled(); + // Fetch user's public key + $this->publicKey = Keymanager::getPublicKey($this->rootView, $this->userId); - $util = new Util($this->rootView, $this->userId); + // Check if OC sharing api is enabled + $sharingEnabled = \OCP\Share::isEnabled(); - // Get all users sharing the file includes current user - $uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $this->relPath, $this->userId); + $util = new Util($this->rootView, $this->userId); - // Fetch public keys for all sharing users - $publicKeys = Keymanager::getPublicKeys($this->rootView, $uniqueUserIds); + // Get all users sharing the file includes current user + $uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $this->relPath, $this->userId); - // Encrypt enc key for all sharing users - $this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys); + // Fetch public keys for all sharing users + $publicKeys = Keymanager::getPublicKeys($this->rootView, $uniqueUserIds); - // Save the new encrypted file key - Keymanager::setFileKey($this->rootView, $this->relPath, $this->userId, $this->encKeyfiles['data']); + // Encrypt enc key for all sharing users + $this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys); - // Save the sharekeys - Keymanager::setShareKeys($this->rootView, $this->relPath, $this->encKeyfiles['keys']); + // Save the new encrypted file key + Keymanager::setFileKey($this->rootView, $this->relPath, $this->userId, $this->encKeyfiles['data']); + + // Save the sharekeys + Keymanager::setShareKeys($this->rootView, $this->relPath, $this->encKeyfiles['keys']); + + // Re-enable proxy - our work is done + \OC_FileProxy::$enabled = $proxyStatus; + } // get file info $fileInfo = $this->rootView->getFileInfo($this->rawPath); @@ -512,9 +523,6 @@ class Stream { $fileInfo = array(); } - // Re-enable proxy - our work is done - \OC_FileProxy::$enabled = $proxyStatus; - // set encryption data $fileInfo['encrypted'] = true; $fileInfo['size'] = $this->size; @@ -525,7 +533,6 @@ class Stream { } return fclose($this->handle); - } } From 1a1c100719643c6056541ffd208642e9f1653c95 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 30 Jul 2013 10:44:01 +0200 Subject: [PATCH 026/112] fix loading.gif size for both upload and deletion, force visiblity --- apps/files/js/filelist.js | 2 +- core/css/styles.css | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index dc820dc93e..e483626a91 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -15,7 +15,7 @@ var FileList={ // filename td td = $('').attr({ "class": "filename", - "style": 'background-image:url('+iconurl+')' + "style": 'background-image:url('+iconurl+'); background-size: 16px;' }); td.append(''); var link_elem = $('').attr({ diff --git a/core/css/styles.css b/core/css/styles.css index 365de759fd..3af1a31158 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -669,7 +669,13 @@ div.crumb:active { background-image: url('../img/actions/delete-hover.svg'); } .edit-icon { background-image: url('../img/actions/rename.svg'); } -.progress-icon { background-image: url('../img/loading.gif'); } +.progress-icon { + background-image: url('../img/loading.gif'); + background-size: 16px; + /* force show the loading icon, not only on hover */ + opacity: 1 !important; + display: inline !important; +} /* buttons */ button.loading { From 22b89670310b5cfc01d72cea960e310e9a52b727 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 12:19:01 +0200 Subject: [PATCH 027/112] check if app is enabled --- apps/files_versions/lib/hooks.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index f0082b301a..81ee3c8b3c 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -19,7 +19,7 @@ class Hooks { */ public static function write_hook( $params ) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + if (\OCP\App::isEnabled('files_versions')) { $path = $params[\OC\Files\Filesystem::signal_param_path]; if($path<>'') { Storage::store($path); @@ -36,12 +36,12 @@ class Hooks { * cleanup the versions directory if the actual file gets deleted */ public static function remove_hook($params) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + + if (\OCP\App::isEnabled('files_versions')) { $path = $params[\OC\Files\Filesystem::signal_param_path]; if($path<>'') { Storage::delete($path); } - } } @@ -53,13 +53,13 @@ class Hooks { * of the stored versions along the actual file */ public static function rename_hook($params) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + + if (\OCP\App::isEnabled('files_versions')) { $oldpath = $params['oldpath']; $newpath = $params['newpath']; if($oldpath<>'' && $newpath<>'') { Storage::rename( $oldpath, $newpath ); } - } } @@ -71,10 +71,11 @@ class Hooks { * to remove the used space for versions stored in the database */ public static function deleteUser_hook($params) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + + if (\OCP\App::isEnabled('files_versions')) { $uid = $params['uid']; Storage::deleteUser($uid); - } + } } } From 3640c99462f35d35f6678d488016d9f672960d2b Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 12:19:04 +0200 Subject: [PATCH 028/112] encrypt/decrypt file versions --- apps/files_encryption/lib/util.php | 127 ++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 3 deletions(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 5649472e0b..4bd07287cd 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -662,6 +662,98 @@ class Util { } + /** + * @brief encrypt versions from given file + * @param array $filelist list of encrypted files, relative to data/user/files + * @return boolean + */ + private function encryptVersions($filelist) { + + $successful = true; + + if (\OCP\App::isEnabled('files_versions')) { + + foreach ($filelist as $filename) { + + $versions = \OCA\Files_Versions\Storage::getVersions($this->userId, $filename); + foreach ($versions as $version) { + + $path = '/' . $this->userId . '/files_versions/' . $version['path'] . '.v' . $version['version']; + + $encHandle = fopen('crypt://' . $path . '.part', 'wb'); + + if ($encHandle === false) { + \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } + + $plainHandle = $this->view->fopen($path, 'rb'); + if ($plainHandle === false) { + \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '.part", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } + + stream_copy_to_stream($plainHandle, $encHandle); + + fclose($encHandle); + fclose($plainHandle); + + $this->view->rename($path . '.part', $path); + } + } + } + + return $successful; + } + + /** + * @brief decrypt versions from given file + * @param string $filelist list of decrypted files, relative to data/user/files + * @return boolean + */ + private function decryptVersions($filelist) { + + $successful = true; + + if (\OCP\App::isEnabled('files_versions')) { + + foreach ($filelist as $filename) { + + $versions = \OCA\Files_Versions\Storage::getVersions($this->userId, $filename); + foreach ($versions as $version) { + + $path = '/' . $this->userId . '/files_versions/' . $version['path'] . '.v' . $version['version']; + + $encHandle = fopen('crypt://' . $path, 'rb'); + + if ($encHandle === false) { + \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } + + $plainHandle = $this->view->fopen($path . '.part', 'wb'); + if ($plainHandle === false) { + \OCP\Util::writeLog('Encryption library', 'couldn\'t open "' . $path . '.part", decryption failed!', \OCP\Util::FATAL); + $successful = false; + continue; + } + + stream_copy_to_stream($encHandle, $plainHandle); + + fclose($encHandle); + fclose($plainHandle); + + $this->view->rename($path . '.part', $path); + } + } + } + + return $successful; + } + /** * @brief Decrypt all files * @return bool @@ -674,6 +766,11 @@ class Util { if ($found) { + $versionStatus = \OCP\App::isEnabled('files_versions'); + \OC_App::disable('files_versions'); + + $decryptedFiles[] = array(); + // Disable proxy to prevent file being encrypted twice \OC_FileProxy::$enabled = false; @@ -685,7 +782,7 @@ class Util { //relative to /data $rawPath = $encryptedFile['path']; - + // Open enc file handle for binary reading $encHandle = fopen('crypt://' . $rawPath, 'rb'); @@ -711,7 +808,6 @@ class Util { continue; } - fclose($encHandle); fclose($plainHandle); @@ -728,8 +824,19 @@ class Util { 'size' => $size, 'unencrypted_size' => $size )); + + $decryptedFiles[] = $relPath; + } + if ($versionStatus) { + \OC_App::enable('files_versions'); + } + + if (!$this->decryptVersions($decryptedFiles)) { + $successful = false; + } + if ($successful) { $this->view->deleteAll($this->keyfilesPath); $this->view->deleteAll($this->shareKeysPath); @@ -752,11 +859,16 @@ class Util { public function encryptAll($dirPath, $legacyPassphrase = null, $newPassphrase = null) { $found = $this->findEncFiles($dirPath); - + if ($found) { // Disable proxy to prevent file being encrypted twice \OC_FileProxy::$enabled = false; + + $versionStatus = \OCP\App::isEnabled('files_versions'); + \OC_App::disable('files_versions'); + + $encryptedFiles = array(); // Encrypt unencrypted files foreach ($found['plain'] as $plainFile) { @@ -792,6 +904,9 @@ class Util { 'size' => $size, 'unencrypted_size' => $size )); + + $encryptedFiles[] = $relPath; + } // Encrypt legacy encrypted files @@ -832,6 +947,12 @@ class Util { \OC_FileProxy::$enabled = true; + if ($versionStatus) { + \OC_App::enable('files_versions'); + } + + $this->encryptVersions($encryptedFiles); + // If files were found, return true return true; } else { From c7eba69aea7eebd0ac1add07dd80dbb37d3443da Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 12:26:07 +0200 Subject: [PATCH 029/112] only show decrypt all files option if encrypted files are available --- settings/personal.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/settings/personal.php b/settings/personal.php index f10b0afb09..bad19ba03c 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -28,8 +28,7 @@ $languageCodes=OC_L10N::findAvailableLanguages(); $enableDecryptAll = false; if (OC_App::isEnabled('files_encryption') === false) { $view = new OC\Files\View('/'.OCP\User::getUser()); - $remainingKeys = $view->getDirectoryContent('/files_encryption/keyfiles'); - if (!empty($remainingKeys)) { + if($view->file_exists('/files_encryption/keyfiles')) { $enableDecryptAll = true; } } From aca7fbe2c8e7b33e022eb6ba73e39e52e6112e61 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 14:18:01 +0200 Subject: [PATCH 030/112] adapt unit tests to the modified stream wrapper --- apps/files_encryption/tests/crypt.php | 36 +++++++++++----------- apps/files_encryption/tests/keymanager.php | 2 +- apps/files_encryption/tests/share.php | 24 +++++++-------- apps/files_encryption/tests/trashbin.php | 6 ++-- apps/files_encryption/tests/webdav.php | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index 9b97df22d1..cd4be9acc4 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -281,7 +281,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time() . '.test'; - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/'. $filename, $this->dataShort); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -339,7 +339,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time() . '.test'; // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataLong . $this->dataLong); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong . $this->dataLong); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -422,7 +422,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time(); // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///'. $this->userId . '/files/' . $filename, $this->dataShort); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -436,7 +436,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { \OC_FileProxy::$enabled = $proxyStatus; // Get file decrypted contents - $decrypt = file_get_contents('crypt://' . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename); $this->assertEquals($this->dataShort, $decrypt); @@ -452,13 +452,13 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time(); // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataLong); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); // Get file decrypted contents - $decrypt = file_get_contents('crypt://' . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename); $this->assertEquals($this->dataLong, $decrypt); @@ -635,13 +635,13 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time(); // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataLong); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); // Get file decrypted contents - $decrypt = file_get_contents('crypt://' . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename); $this->assertEquals($this->dataLong, $decrypt); @@ -650,7 +650,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->rename($filename, $newFilename); // Get file decrypted contents - $newDecrypt = file_get_contents('crypt://' . $newFilename); + $newDecrypt = file_get_contents('crypt:///'. $this->userId . '/files/' . $newFilename); $this->assertEquals($this->dataLong, $newDecrypt); @@ -666,13 +666,13 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time(); // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataLong); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); // Get file decrypted contents - $decrypt = file_get_contents('crypt://' . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename); $this->assertEquals($this->dataLong, $decrypt); @@ -683,7 +683,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->rename($filename, $newFolder . '/' . $newFilename); // Get file decrypted contents - $newDecrypt = file_get_contents('crypt://' . $newFolder . '/' . $newFilename); + $newDecrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $newFolder . '/' . $newFilename); $this->assertEquals($this->dataLong, $newDecrypt); @@ -704,13 +704,13 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->mkdir($folder); // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $folder . $filename, $this->dataLong); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $folder . $filename, $this->dataLong); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); // Get file decrypted contents - $decrypt = file_get_contents('crypt://' . $folder . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $folder . $filename); $this->assertEquals($this->dataLong, $decrypt); @@ -720,7 +720,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $view->rename($folder, $newFolder); // Get file decrypted contents - $newDecrypt = file_get_contents('crypt://' . $newFolder . $filename); + $newDecrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $newFolder . $filename); $this->assertEquals($this->dataLong, $newDecrypt); @@ -736,13 +736,13 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time(); // Save long data as encrypted file using stream wrapper - $cryptedFile = file_put_contents('crypt://' . $filename, $this->dataLong); + $cryptedFile = file_put_contents('crypt:///' . $this->userId . '/files/' . $filename, $this->dataLong); // Test that data was successfully written $this->assertTrue(is_int($cryptedFile)); // Get file decrypted contents - $decrypt = file_get_contents('crypt://' . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename); $this->assertEquals($this->dataLong, $decrypt); @@ -755,7 +755,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { OCA\Encryption\Hooks::login($params); // Get file decrypted contents - $newDecrypt = file_get_contents('crypt://' . $filename); + $newDecrypt = file_get_contents('crypt:///' . $this->userId . '/files/' . $filename); $this->assertEquals($this->dataLong, $newDecrypt); diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php index b644856d95..9a780d4587 100644 --- a/apps/files_encryption/tests/keymanager.php +++ b/apps/files_encryption/tests/keymanager.php @@ -233,7 +233,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { \OC_FileProxy::$enabled = true; // save file with content - $cryptedFile = file_put_contents('crypt:///folder1/subfolder/subsubfolder/' . $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt://'.'/'.Test_Encryption_Keymanager::TEST_USER.'files//folder1/subfolder/subsubfolder/' . $filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php index ebf678da78..987d250cf0 100755 --- a/apps/files_encryption/tests/share.php +++ b/apps/files_encryption/tests/share.php @@ -136,7 +136,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // save file with content - $cryptedFile = file_put_contents('crypt://' . $this->filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -293,7 +293,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { . $this->subsubfolder); // save file with content - $cryptedFile = file_put_contents('crypt://' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' + $cryptedFile = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename, $this->dataShort); // test that data was successfully written @@ -499,7 +499,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // save file with content - $cryptedFile = file_put_contents('crypt://' . $this->filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -540,7 +540,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \OC_User::setUserId(false); // get file contents - $retrievedCryptedFile = file_get_contents('crypt://' . $this->filename); + $retrievedCryptedFile = file_get_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename); // check if data is the same as we previously written $this->assertEquals($this->dataShort, $retrievedCryptedFile); @@ -575,7 +575,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // save file with content - $cryptedFile = file_put_contents('crypt://' . $this->filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -675,8 +675,8 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { . $this->subsubfolder); // save file with content - $cryptedFile1 = file_put_contents('crypt://' . $this->filename, $this->dataShort); - $cryptedFile2 = file_put_contents('crypt://' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' + $cryptedFile1 = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort); + $cryptedFile2 = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename, $this->dataShort); // test that data was successfully written @@ -777,8 +777,8 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { . $this->subsubfolder); // save file with content - $cryptedFile1 = file_put_contents('crypt://' . $this->filename, $this->dataShort); - $cryptedFile2 = file_put_contents('crypt://' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' + $cryptedFile1 = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort); + $cryptedFile2 = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename, $this->dataShort); // test that data was successfully written @@ -811,9 +811,9 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER2, false, 'test'); // get file contents - $retrievedCryptedFile1 = file_get_contents('crypt://' . $this->filename); + $retrievedCryptedFile1 = file_get_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename); $retrievedCryptedFile2 = file_get_contents( - 'crypt://' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename); + 'crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->folder1 . $this->subfolder . $this->subsubfolder . '/' . $this->filename); // check if data is the same as we previously written $this->assertEquals($this->dataShort, $retrievedCryptedFile1); @@ -854,7 +854,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); // save file with content - $cryptedFile = file_put_contents('crypt://' . $this->filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' . \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1 . '/files/' . $this->filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php index ade968fbec..67854bd80d 100755 --- a/apps/files_encryption/tests/trashbin.php +++ b/apps/files_encryption/tests/trashbin.php @@ -122,7 +122,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time() . '.txt'; // save file with content - $cryptedFile = file_put_contents('crypt:///' . $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/'. $filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -223,10 +223,10 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { function testPermanentDeleteFile() { // generate filename - $filename = 'tmp-' . time() . '.txt'; + $filename = '/tmp-' . time() . '.txt'; // save file with content - $cryptedFile = file_put_contents('crypt:///' . $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/' . $filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); diff --git a/apps/files_encryption/tests/webdav.php b/apps/files_encryption/tests/webdav.php index 1d406789f0..9268bf2c25 100755 --- a/apps/files_encryption/tests/webdav.php +++ b/apps/files_encryption/tests/webdav.php @@ -153,7 +153,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase { $this->assertTrue(Encryption\Crypt::isCatfileContent($encryptedContent)); // get decrypted file contents - $decrypt = file_get_contents('crypt://' . $filename); + $decrypt = file_get_contents('crypt:///' . $this->userId . '/files'. $filename); // check if file content match with the written content $this->assertEquals($this->dataShort, $decrypt); From a6ced6b53fe7ff32bf126f75bda4fdb23bda19c1 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 14:28:24 +0200 Subject: [PATCH 031/112] remove unused method, the right one is in util.php --- apps/files_encryption/lib/crypt.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index d8d1902909..759e14b40b 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -663,8 +663,4 @@ class Crypt { } } - public static function decryptAll() { - error_log("decrypt all"); - } - } \ No newline at end of file From f9d1d79929e8414789245c79369ceadf1af67ab4 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 30 Jul 2013 14:43:48 +0200 Subject: [PATCH 032/112] reduce z-index of settings popup, fix #4212 --- core/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/css/styles.css b/core/css/styles.css index 0dd66fb5b7..9c6d39030e 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -596,7 +596,7 @@ span.ui-icon {float: left; margin: 3px 7px 30px 0;} #category_addinput { width:10em; } /* ---- APP SETTINGS ---- */ -.popup { background-color:white; border-radius:10px 10px 10px 10px; box-shadow:0 0 20px #888; color:#333; padding:10px; position:fixed !important; z-index:200; } +.popup { background-color:white; border-radius:10px 10px 10px 10px; box-shadow:0 0 20px #888; color:#333; padding:10px; position:fixed !important; z-index:100; } .popup.topright { top:7em; right:1em; } .popup.bottomleft { bottom:1em; left:33em; } .popup .close { position:absolute; top:0.2em; right:0.2em; height:20px; width:20px; background:url('../img/actions/close.svg') no-repeat center; } From 31afbb3434b98aaa839d20d035a449b842b9d97a Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 30 Jul 2013 14:47:05 +0200 Subject: [PATCH 033/112] remove ugly inset shadow from header --- core/css/styles.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/css/styles.css b/core/css/styles.css index 9c6d39030e..e7dcdf67d6 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -19,7 +19,10 @@ body { background:#fefefe; font:normal .8em/1.6em "Helvetica Neue",Helvetica,Ari #body-user #header, #body-settings #header { position:fixed; top:0; left:0; right:0; z-index:100; height:45px; line-height:2.5em; background:#1d2d44 url('../img/noise.png') repeat; - -moz-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; } + -moz-box-shadow:0 0 10px rgba(0, 0, 0, .5); + -webkit-box-shadow:0 0 10px rgba(0, 0, 0, .5); + box-shadow:0 0 10px rgba(0, 0, 0, .5); +} #body-login { text-align: center; From a212c98125c956c35a72e966d72e720b0fd42376 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 15:27:59 +0200 Subject: [PATCH 034/112] handle error if we can't handle the given path --- apps/files_encryption/lib/helper.php | 4 ++-- apps/files_encryption/lib/stream.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index f5a5d269a6..a9a78026d9 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -201,7 +201,7 @@ class Helper { $split = explode('/', $trimmed); // it is not a file relative to data/user/files - if ($split[1] !== 'files') { + if (count($split) < 3 || $split[1] !== 'files') { return false; } @@ -220,7 +220,7 @@ class Helper { $trimmed = ltrim($path, '/'); $split = explode('/', $trimmed); - if ($split[1] !== "files_versions") { + if (count($split) < 3 || $split[1] !== "files_versions") { return false; } diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index d9146e75b6..335ea3733e 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -107,6 +107,11 @@ class Stream { $this->relPath = Helper::getPathToRealFile($this->rawPath); } + if($this->relPath === false) { + \OCP\Util::writeLog('Encryption library', 'failed to open file "' . $this->rawPath . '" expecting a path to user/files or to user/files_versions', \OCP\Util::ERROR); + return false; + } + // Disable fileproxies so we can get the file size and open the source file without recursive encryption $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; From 25493227636d19ff6bc28ef10c0c319cc572ea28 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 18:17:33 +0200 Subject: [PATCH 035/112] we need to use the path relative to data/ --- apps/files_encryption/lib/util.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 4bd07287cd..7983c829e1 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -565,9 +565,6 @@ class Util { // split the path parts $pathParts = explode('/', $path); - // get relative path - $relativePath = \OCA\Encryption\Helper::stripUserFilesPath($path); - if (isset($pathParts[2]) && $pathParts[2] === 'files' && $this->view->file_exists($path) && $this->isEncryptedPath($path) ) { @@ -580,7 +577,7 @@ class Util { $lastChunkNr = floor($size / 8192); // open stream - $stream = fopen('crypt://' . $relativePath, "r"); + $stream = fopen('crypt://' . $path, "r"); if (is_resource($stream)) { // calculate last chunk position From 6c96a5273b2df54fe58a515c7863276095820c63 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 30 Jul 2013 18:21:23 +0200 Subject: [PATCH 036/112] fixing some unit tests --- apps/files_encryption/tests/keymanager.php | 8 ++++---- apps/files_encryption/tests/trashbin.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php index 9a780d4587..a07bd19c1d 100644 --- a/apps/files_encryption/tests/keymanager.php +++ b/apps/files_encryption/tests/keymanager.php @@ -141,9 +141,6 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { */ function testSetFileKey() { - # NOTE: This cannot be tested until we are able to break out - # of the FileSystemView data directory root - $key = Encryption\Crypt::symmetricEncryptFileContentKeyfile($this->randomKey, 'hat'); $file = 'unittest-' . time() . '.txt'; @@ -159,6 +156,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { //$view = new \OC_FilesystemView( '/' . $this->userId . '/files_encryption/keyfiles' ); Encryption\Keymanager::setFileKey($this->view, $file, $this->userId, $key['key']); + + $this->assertTrue($this->view->file_exists( + '/' . $this->userId . '/files_encryption/keyfiles/' . $file . '.key')); // enable encryption proxy $proxyStatus = \OC_FileProxy::$enabled; @@ -233,7 +233,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase { \OC_FileProxy::$enabled = true; // save file with content - $cryptedFile = file_put_contents('crypt://'.'/'.Test_Encryption_Keymanager::TEST_USER.'files//folder1/subfolder/subsubfolder/' . $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1/subfolder/subsubfolder' . $filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php index 67854bd80d..985271b902 100755 --- a/apps/files_encryption/tests/trashbin.php +++ b/apps/files_encryption/tests/trashbin.php @@ -122,7 +122,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { $filename = 'tmp-' . time() . '.txt'; // save file with content - $cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/'. $filename, $this->dataShort); + $cryptedFile = file_put_contents('crypt:///' .\Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename, $this->dataShort); // test that data was successfully written $this->assertTrue(is_int($cryptedFile)); @@ -223,7 +223,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase { function testPermanentDeleteFile() { // generate filename - $filename = '/tmp-' . time() . '.txt'; + $filename = 'tmp-' . time() . '.txt'; // save file with content $cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/' . $filename, $this->dataShort); From 0a5be39446e01f6e4a25c11370b2b133198a92b7 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 31 Jul 2013 09:58:57 +0200 Subject: [PATCH 037/112] remove unused and never to be used pagination --- core/templates/part.pagenavi.php | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 core/templates/part.pagenavi.php diff --git a/core/templates/part.pagenavi.php b/core/templates/part.pagenavi.php deleted file mode 100644 index 2f5c218376..0000000000 --- a/core/templates/part.pagenavi.php +++ /dev/null @@ -1,22 +0,0 @@ - - 0):?> - t( 'prev' )); ?> - - 0):?> - … - - - - - - - - - - … - - - - t( 'next' )); ?> - - From 8eaa0e73366cc7bd4685394480f0498bc2e45e8b Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 31 Jul 2013 10:04:02 +0200 Subject: [PATCH 038/112] remove table layout for background jobs --- settings/templates/admin.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 2b14c1460d..e54586b80d 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -90,38 +90,30 @@ if (!$_['internetconnectionworking']) { t('Cron'));?> - - - + > AJAX t("Execute one task with each page loaded")); ?> - - - - + + > Webcron t("cron.php is registered at a webcron service to call cron.php once a minute over http.")); ?> - - - - + + > Cron t("Use systems cron service to call the cron.php file once a minute.")); ?> - - - +
+ t( "Decrypt all Files" )); ?> + +
+ + t( "Log-in password" )); ?> + t( "Decrypt all Files" )); ?> +
> AJAX t("Execute one task with each page loaded")); ?> -
> Webcron t("cron.php is registered at a webcron service to call cron.php once a minute over http.")); ?> -
> Cron t("Use systems cron service to call the cron.php file once a minute.")); ?> -
t('User Login Filter'));?> - t('use %%uid placeholder, e.g. "uid=%%uid"'));?>
t('User List Filter'));?> - t('without any placeholder, e.g. "objectClass=person".'));?>
t('Group Filter'));?> - t('without any placeholder, e.g. "objectClass=posixGroup".'));?>
t('Disable Main Server'));?>
t('Use TLS'));?>
t('Case insensitve LDAP server (Windows)'));?>>
t('Turn off SSL certificate validation.'));?>t('Not recommended, use for testing only.'));?>
t('Turn off SSL certificate validation.'));?>
t('Cache Time-To-Live'));?>