diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08183cd6f..d348ebe64 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -135,7 +135,7 @@ Our team has limited resources, so we've chosen to introduce the new (and **expe
To enable the use of the OnlyOffice Document and Presentation editor for everyone on your instance, edit your [customize/application_config.js](https://docs.cryptpad.fr/en/admin_guide/customization.html#application-config) file to include `AppConfig.enableEarlyAccess = true;`.
-If you wish to avoid a rush of support tickets from your users by limiting early access to users with custom quota increases, add another line like so `Constants.earlyAccessApps = ['doc', 'presentation'];`.
+If you wish to avoid a rush of support tickets from your users by limiting early access to users with custom quota increases, add another line like so `AppConfig.premiumTypes = ['doc', 'presentation'];`.
As these editors become more stable we plan to enable them by default on third-party instances. Keep in mind, these editors may be unstable and users may lose their work. Our team will fix bugs given sufficient information to reproduce them, but we will not take the time to help you recover lost data unless you have taken a support contract with us.
diff --git a/www/common/boot2.js b/www/common/boot2.js
index 097d76489..925fb030c 100644
--- a/www/common/boot2.js
+++ b/www/common/boot2.js
@@ -86,11 +86,11 @@ define([
}
} catch (e) { console.error(e); failStore(); }
- require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
if (typeof(Promise) !== 'function') {
- setTimeout(function () {
+ return void setTimeout(function () {
var s = "Internet Explorer is not supported anymore, including by Microsoft.\n\nMost of CryptPad's collaborative functionality requires a modern browser to work.\n\nWe recommend Mozilla Firefox.";
window.alert(s);
});
}
+ require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
});
diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js
index 38fee4c29..d7b401fa2 100644
--- a/www/common/common-ui-elements.js
+++ b/www/common/common-ui-elements.js
@@ -808,7 +808,9 @@ define([
h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_storeInDrive)
])).click(common.prepareFeedback(type)).click(function () {
$(button).hide();
- common.getSframeChannel().query("Q_AUTOSTORE_STORE", null, function (err, obj) {
+ common.getSframeChannel().query("Q_AUTOSTORE_STORE", {
+ forceOwnDrive: true,
+ }, function (err, obj) {
var error = err || (obj && obj.error);
if (error) {
$(button).show();
diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js
index a0d584ea5..d32d06eac 100644
--- a/www/common/cryptpad-common.js
+++ b/www/common/cryptpad-common.js
@@ -974,6 +974,9 @@ define([
data.forceSave = 1;
//delete common.initialTeam;
}
+ if (data.forceOwnDrive) {
+ data.teamId = -1;
+ }
if (common.initialPath) {
if (!data.path) {
data.path = Array.isArray(common.initialPath) ? common.initialPath
diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js
index 729793039..0856572bc 100644
--- a/www/common/outer/async-store.js
+++ b/www/common/outer/async-store.js
@@ -1159,7 +1159,7 @@ define([
expire = data.expire;
}
- var storeLocally = data.teamId === -1;
+ //var storeLocally = data.teamId === -1;
if (data.teamId === -1) { data.teamId = undefined; }
// If a teamId is provided, it means we want to store the pad in a specific
@@ -1170,11 +1170,8 @@ define([
// If it is stored, update its data, otherwise ask the user if they want to store it
var allData = [];
var sendTo = [];
- var inMyDrive;
+ var inTargetDrive, inMyDrive;
getAllStores().forEach(function (s) {
- if (data.teamId && s.id !== data.teamId) { return; }
- if (storeLocally && s.id) { return; }
-
// If this is an edit link but we don't have edit rights, this entry is not useful
if (h.mode === "edit" && s.id && !s.secondaryKey) {
return;
@@ -1185,16 +1182,15 @@ define([
sendTo.push(s.id);
}
- // If we've just accepted ownership for a pad stored in a shared folder,
- // we need to make a copy of this pad in our drive. We're going to check
- // if the pad is stored in our MAIN drive.
- // We only need to check this if the current manager is the target (data.teamId)
- if (data.teamId === s.id) {
- inMyDrive = res.some(function (obj) {
- return !obj.fId;
- });
+ // Check if the pad is already stored in the specified drive (data.teamId)
+ if ((!s.id && !data.teamId) || Number(s.id) === data.teamId) {
+ if (!inTargetDrive) {
+ inTargetDrive = res.length;
+ }
}
+ if (!s.id) { inMyDrive = res.length; }
+
Array.prototype.push.apply(allData, res);
});
var contains = allData.length !== 0;
@@ -1231,7 +1227,7 @@ define([
});
// Add the pad if it does not exist in our drive
- if (!contains || (data.forceSave && !inMyDrive)) {
+ if (!contains || (data.forceSave && !inTargetDrive)) {
var autoStore = Util.find(store.proxy, ['settings', 'general', 'autostore']);
if (autoStore !== 1 && !data.forceSave && !data.path) {
// send event to inner to display the corner popup
@@ -1258,7 +1254,8 @@ define([
}, cb);
// Let inner know that dropped files shouldn't trigger the popup
postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", {
- stored: true
+ stored: true,
+ inMyDrive: inMyDrive || (!contains && !data.teamId) // display "store in cryptdrive" entry
});
return;
}
diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js
index 7351a2485..91d11c20d 100644
--- a/www/common/sframe-common-outer.js
+++ b/www/common/sframe-common-outer.js
@@ -1181,7 +1181,8 @@ define([
title: currentTitle,
channel: secret.channel,
path: initialPathInDrive, // Where to store the pad if we don't have it in our drive
- forceSave: true
+ forceSave: true,
+ forceOwnDrive: obj && obj.forceOwnDrive
};
setPadTitle(data, cb);
});
diff --git a/www/common/translations/messages.es.json b/www/common/translations/messages.es.json
index 00d2b357b..2c793dace 100644
--- a/www/common/translations/messages.es.json
+++ b/www/common/translations/messages.es.json
@@ -669,5 +669,24 @@
"footer_product": "Producto",
"admin_flushCacheDone": "Vaciado de caché exitoso",
"admin_flushCacheButton": "Vaciar caché",
- "admin_flushCacheHint": "Obligar a usuarios a descargar los recursos más nuevos para el cliente (sólo si su servidor está en modo actualizado o “fresh mode”)"
+ "admin_flushCacheHint": "Obligar a usuarios a descargar los recursos más nuevos para el cliente (sólo si su servidor está en modo actualizado o “fresh mode”)",
+ "profile_friendRequestSent": "Pedido de contacto pendiente...",
+ "profile_info": "Otros usuarios pueden encontrar su perfil haciendo clic en su nombre en la lista de usuarios de los documentos.",
+ "profile_addLink": "Añade un enlace a su sitio web",
+ "profile_editDescription": "Edita su descripción",
+ "profile_addDescription": "Añadir una descripción",
+ "notifications_empty": "No hay notificaciones disponibles",
+ "friendRequest_notification": "{0} le envió una solicitud de contacto",
+ "friendRequest_received": "{0} quiere ser tu contato",
+ "friendRequest_accepted": "{0} aceptó su solicitud de contacto",
+ "friendRequest_declined": "{0} rechazó su solicitud de contacto",
+ "friendRequest_decline": "Declinar",
+ "friendRequest_accept": "Aceptar (Enter)",
+ "friendRequest_later": "Decidir después",
+ "drive_activeOld": "Documentos menos recientes",
+ "drive_active28Days": "Últimas 4 semanas",
+ "drive_active7Days": "Últimos 7 dias",
+ "drive_active1Day": "Últimas 24 horas",
+ "settings_codeSpellcheckLabel": "Habilite la verificación ortográfica en el editor de código",
+ "settings_codeSpellcheckTitle": "Corrección ortográfica"
}
diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json
index 74195430e..5a7f8e22b 100644
--- a/www/common/translations/messages.fr.json
+++ b/www/common/translations/messages.fr.json
@@ -964,7 +964,7 @@
"todo_move": "Votre liste de tâches est désormais dans le kanban {0} dans votre Drive.",
"settings_safeLinkDefault": "Les liens sécurisés sont désormais activés par défaut. Veuillez utiliser le menu Partager pour copier les liens plutôt que la barre d'adresse de votre navigateur.",
"support_languagesPreamble": "L'équipe de support parle les langues suivantes :",
- "info_privacyFlavour": "Description de la confidentialité de vos données.",
+ "info_privacyFlavour": "Déclaration de confidentialité pour cette instance",
"user_about": "À propos de CryptPad",
"info_imprintFlavour": "Informations légales sur les administrateurs de cette instance.",
"support_cat_all": "Tout",
@@ -1427,5 +1427,14 @@
"form_exportSheet": "Exporter vers Tableur",
"form_answerChoice": "Veuillez choisir comment vous souhaitez répondre à ce formulaire :",
"bounce_danger": "Le lien sur lequel vous avez cliqué ne mène pas à une page web mais à du code ou des données qui pourraient être dangereuses.\n\n(\"{0}\")\n\nCryptPad bloque ce type de lien pour des raisons de sécurité. En cliquant sur OK, vous fermerez cet onglet.",
- "bounce_confirm": "Vous êtes sur le point de quitter : {0}\n\nÊtes vous sûr de vouloir visiter \"{1}\" ?"
+ "bounce_confirm": "Vous êtes sur le point de quitter : {0}\n\nÊtes vous sûr de vouloir visiter \"{1}\" ?",
+ "info_sourceFlavour": "Code source de CryptPad",
+ "info_termsFlavour": "Conditions d'utilisation pour cette instance",
+ "footer_source": "Code source",
+ "admin_jurisdictionHint": "Le pays où les données chiffrées de cette instance sont hébergées",
+ "admin_descriptionHint": "Le texte descriptif affiché pour cette instance dans la liste des instances publiques sur cryptpad.org",
+ "admin_descriptionTitle": "Description de l'instance",
+ "admin_nameHint": "Le nom affiché pour cette instance dans la liste des instances publiques sur cryptpad.org",
+ "admin_nameTitle": "Nom de l'instance",
+ "admin_archiveNote": "Note"
}
diff --git a/www/common/translations/messages.ja.json b/www/common/translations/messages.ja.json
index f99d4ef96..281d52255 100644
--- a/www/common/translations/messages.ja.json
+++ b/www/common/translations/messages.ja.json
@@ -1422,5 +1422,10 @@
"form_conditional_addAnd": "「かつ」の条件を追加",
"form_conditional_add": "「あるいは」の条件を追加",
"form_condition_isnot": "等しくない",
- "form_condition_is": "等しい"
+ "form_condition_is": "等しい",
+ "form_template_poll": "スケジュールの投票のテンプレート",
+ "bounce_danger": "クリックしたリンクは、ウェブページではなく、悪質かもしれないコードやデータに結びついています。\n\n(\"{0}\")\n\nセキュリティー上の理由で、CryptPadはこのデータをブロックしています。OKをクリックするとタブが閉じます。",
+ "bounce_confirm": "このページから退出しようとしています: {0}\n\n次のページを開いてよろしいですか?:{1}",
+ "form_condition_hasnot": "含まない",
+ "form_condition_has": "含む"
}
diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json
index 11b05dc6f..1ac415d7c 100644
--- a/www/common/translations/messages.json
+++ b/www/common/translations/messages.json
@@ -967,9 +967,9 @@
"slide_textCol": "Text color",
"support_languagesPreamble": "The support team speaks the following languages:",
"settings_safeLinkDefault": "Safe Links are now turned on by default. Please use the Share menu to copy links rather than your browser's address bar.",
- "info_imprintFlavour": "Legal information about the administrators of this instance.",
+ "info_imprintFlavour": "Legal information about the administrators of this instance",
"user_about": "About CryptPad",
- "info_privacyFlavour": "Our privacy policy describes how we treat your data.",
+ "info_privacyFlavour": "Privacy policy for this instance",
"support_cat_account": "User account",
"support_cat_data": "Loss of content",
"support_cat_bug": "Bug report",
@@ -1427,5 +1427,16 @@
"form_exportSheet": "Export to Sheet",
"form_answerChoice": "Please choose how you would like to answer this form:",
"bounce_confirm": "You are about to leave: {0}\n\nAre you sure you want to visit \"{1}\"?",
- "bounce_danger": "The link you clicked does not lead to a web-page but to some code or data that could be malicious.\n\n(\"{0}\")\n\nCryptPad blocks these for security reasons. Clicking OK will close this tab."
+ "bounce_danger": "The link you clicked does not lead to a web-page but to some code or data that could be malicious.\n\n(\"{0}\")\n\nCryptPad blocks these for security reasons. Clicking OK will close this tab.",
+ "admin_archiveNote": "Note",
+ "admin_nameTitle": "Instance name",
+ "admin_nameHint": "The name displayed for this instance in the list of public instances on cryptpad.org",
+ "ui_saved": "{0} saved",
+ "admin_descriptionTitle": "Instance description",
+ "admin_descriptionHint": "The descriptive text displayed for this instance in the list of public instances on cryptpad.org",
+ "admin_jurisdictionTitle": "Hosting location",
+ "admin_jurisdictionHint": "The country where this instance's encrypted data is hosted",
+ "footer_source": "Source code",
+ "info_termsFlavour": "Terms of service for this instance",
+ "info_sourceFlavour": "Source code for CryptPad"
}
diff --git a/www/debug/main.js b/www/debug/main.js
index 6f855e1db..124ea39f9 100644
--- a/www/debug/main.js
+++ b/www/debug/main.js
@@ -13,6 +13,9 @@ define([
'/common/common-interface.js',
], function (nThen, ApiConfig, $, RequireConfig, SFCommonO,
Cryptpad, Util, Hash, Realtime, Constants, UI) {
+ if (window.top !== window) {
+ return void window.alert(`If you are seeing this message then somebody might be trying to compromise your CryptPad account. Please contact the CryptPad development team.`);
+ }
window.Cryptpad = {
Common: Cryptpad,
diff --git a/www/form/inner.js b/www/form/inner.js
index bceb1219b..5bcb642fd 100644
--- a/www/form/inner.js
+++ b/www/form/inner.js
@@ -706,7 +706,7 @@ define([
}
var day = _date && allDays[_date.getDay()];
return h('div.cp-poll-cell.cp-form-poll-option', {
- title: Util.fixHTML(data)
+ title: data,
}, [
opts.type === 'day' ? h('span.cp-form-weekday', day) : undefined,
opts.type === 'day' ? h('span.cp-form-weekday-separator', ' - ') : undefined,
@@ -865,7 +865,7 @@ define([
if (totalMax.value) {
$total.find('[data-id]').removeClass('cp-poll-best');
totalMax.data.forEach(function (k) {
- $total.find('[data-id="'+k+'"]').addClass('cp-poll-best');
+ $total.find('[data-id="'+ (k.replace(/"/g, '\\"')) + '"]').addClass('cp-poll-best');
});
}
};
@@ -986,6 +986,12 @@ define([
});
});
+ var linkClickHandler = function (ev) {
+ ev.preventDefault();
+ var href = ($(this).attr('href') || '').trim();
+ if (!href) { return; }
+ APP.common.openUnsafeURL(href);
+ };
var STATIC_TYPES = {
md: {
@@ -999,6 +1005,8 @@ define([
}, opts.text);
var $tag = $(tag);
DiffMd.apply(DiffMd.render(opts.text || ''), $tag, APP.common);
+ $tag.find('a').click(linkClickHandler);
+
var cursorGetter;
return {
tag: tag,
@@ -2904,6 +2912,7 @@ define([
if (content.answers.msg) {
var $desc = $(description);
DiffMd.apply(DiffMd.render(content.answers.msg), $desc, APP.common);
+ $desc.find('a').click(linkClickHandler);
}
var actions = h('div.cp-form-submit-actions', [
diff --git a/www/login/main.js b/www/login/main.js
index df0be1733..1a27343fc 100644
--- a/www/login/main.js
+++ b/www/login/main.js
@@ -10,6 +10,7 @@ define([
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function ($, Cryptpad, Login, UI, Realtime, Feedback, LocalStore /*, Test */) {
+ if (window.top !== window) { return; }
$(function () {
var $checkImport = $('#import-recent');
if (LocalStore.isLoggedIn()) {
diff --git a/www/register/main.js b/www/register/main.js
index 301306f70..8edbaab92 100644
--- a/www/register/main.js
+++ b/www/register/main.js
@@ -14,6 +14,7 @@ define([
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function ($, Login, Cryptpad, /*Test,*/ Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h) {
+ if (window.top !== window) { return; }
var Messages = Cryptpad.Messages;
$(function () {
if (LocalStore.isLoggedIn()) {