Fix CSP issues for missing files (404)
This commit is contained in:
@@ -618,7 +618,7 @@ define(function () {
|
|||||||
out.upload_mustLogin = "Vous devez vous connecter pour importer un fichier";
|
out.upload_mustLogin = "Vous devez vous connecter pour importer un fichier";
|
||||||
out.download_button = "Déchiffrer et télécharger";
|
out.download_button = "Déchiffrer et télécharger";
|
||||||
out.download_mt_button = "Télécharger";
|
out.download_mt_button = "Télécharger";
|
||||||
out.download_resourceNotAvailable = "Le fichier demandé n'est pas disponible...";
|
out.download_resourceNotAvailable = "Le fichier demandé n'est pas disponible... Appuyez sur Échap pour continuer.";
|
||||||
|
|
||||||
out.todo_title = "CryptTodo";
|
out.todo_title = "CryptTodo";
|
||||||
out.todo_newTodoNamePlaceholder = "Décrivez votre tâche...";
|
out.todo_newTodoNamePlaceholder = "Décrivez votre tâche...";
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ define(function () {
|
|||||||
out.upload_mustLogin = "You must be logged in to upload files";
|
out.upload_mustLogin = "You must be logged in to upload files";
|
||||||
out.download_button = "Decrypt & Download";
|
out.download_button = "Decrypt & Download";
|
||||||
out.download_mt_button = "Download";
|
out.download_mt_button = "Download";
|
||||||
out.download_resourceNotAvailable = "The requested resource was not available...";
|
out.download_resourceNotAvailable = "The requested resource was not available... Press Esc to continue.";
|
||||||
|
|
||||||
out.todo_title = "CryptTodo";
|
out.todo_title = "CryptTodo";
|
||||||
out.todo_newTodoNamePlaceholder = "Describe your task...";
|
out.todo_newTodoNamePlaceholder = "Describe your task...";
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ define([
|
|||||||
xhr.setRequestHeader('Range', 'bytes=0-1');
|
xhr.setRequestHeader('Range', 'bytes=0-1');
|
||||||
xhr.responseType = 'arraybuffer';
|
xhr.responseType = 'arraybuffer';
|
||||||
|
|
||||||
|
xhr.onerror= function () { return CB('XHR_ERROR'); };
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
if (/^4/.test('' + this.status)) { return CB('XHR_ERROR'); }
|
if (/^4/.test('' + this.status)) { return CB('XHR_ERROR'); }
|
||||||
var res = new Uint8Array(xhr.response);
|
var res = new Uint8Array(xhr.response);
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ define([
|
|||||||
FileCrypto.fetchDecryptedMetadata(src, key, function (e, metadata) {
|
FileCrypto.fetchDecryptedMetadata(src, key, function (e, metadata) {
|
||||||
if (e) {
|
if (e) {
|
||||||
if (e === 'XHR_ERROR') {
|
if (e === 'XHR_ERROR') {
|
||||||
return void UI.errorLoadingScreen(Messages.download_resourceNotAvailable);
|
return void UI.errorLoadingScreen(Messages.download_resourceNotAvailable, false, function () {
|
||||||
|
common.gotoURL('/file/');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return void console.error(e);
|
return void console.error(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user