Compare commits

..

91 Commits

Author SHA1 Message Date
Danny Coates
df1b00fa2c v2.2.0 2017-12-06 15:57:55 -08:00
Danny Coates
6434329f61 added utm params to unsupported page download link 2017-12-06 15:43:36 -08:00
Arash Mousavi
454853dc93 Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send
Localization authors:
- Arash Mousavi <mousavi.arash@gmail.com>
2017-12-06 21:51:17 +00:00
Filip Hruška
b663bf94e4 Pontoon: Update Czech (cs) localization of Test Pilot: Firefox Send
Localization authors:
- Filip Hruška <fhr@fhrnet.eu>
2017-12-06 20:50:37 +00:00
Kohei Yoshino
081cf081c5 Pontoon: Update Japanese (ja) localization of Test Pilot: Firefox Send
Localization authors:
- Kohei Yoshino <kohei.yoshino@gmail.com>
2017-12-06 18:10:58 +00:00
Selim Şumlu
f86b164c62 Pontoon: Update Turkish (tr) localization of Test Pilot: Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2017-12-06 16:50:46 +00:00
Marko Andrejić
92b79e8272 Pontoon: Update Serbian (sr) localization of Test Pilot: Firefox Send
Localization authors:
- Marko Andrejić <marko.andrejic93@gmail.com>
2017-12-06 15:30:40 +00:00
Marcelo Poli
335086c9d7 Pontoon: Update Spanish (Argentina) (es-AR) localization of Test Pilot: Firefox Send
Localization authors:
- Marcelo Poli <enzomatrix@gmail.com>
2017-12-06 15:11:09 +00:00
Bjørn I
60806a3954 Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Bjørn I. <bjorn.svindseth@online.no>
2017-12-06 15:11:02 +00:00
Lan Glad
e0e96e7b9b Pontoon: Update Slovenian (sl) localization of Test Pilot: Firefox Send
Localization authors:
- Rok Žerdin <rok.zerdin1990@gmail.com>
- Lan Glad <upwinxp@gmail.com>
2017-12-06 14:50:51 +00:00
Håvar Henriksen
cda35eb127 Pontoon: Update Norwegian Bokmål (nb-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2017-12-06 13:11:06 +00:00
ravmn
bf1ef345a2 Pontoon: Update Spanish (Chile) (es-CL) localization of Test Pilot: Firefox Send
Localization authors:
- ravmn <ravmn@ravmn.cl>
2017-12-06 12:51:59 +00:00
Håvar Henriksen
e54ae7a51f Pontoon: Update Norwegian Bokmål (nb-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2017-12-06 12:51:57 +00:00
Rhoslyn Prys
a5a2d654ae Pontoon: Update Welsh (cy) localization of Test Pilot: Firefox Send
Localization authors:
- Rhoslyn Prys <rprys@yahoo.com>
2017-12-06 09:50:53 +00:00
Alexander Slovesnik
b6340d8657 Pontoon: Update Russian (ru) localization of Test Pilot: Firefox Send
Localization authors:
- Alexander Slovesnik <unghost@mozilla-russia.org>
- Victor Bychek <a@bychek.ru>
2017-12-06 09:50:50 +00:00
Balázs Meskó
cdb87e2ac2 Pontoon: Update Hungarian (hu) localization of Test Pilot: Firefox Send
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
2017-12-06 08:51:11 +00:00
Michael Wolf
a0baed4e14 Pontoon: Update Sorbian, Lower (dsb) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2017-12-06 06:50:51 +00:00
Francesco Lodolo
573a2d4fb1 Pontoon: Update Italian (it) localization of Test Pilot: Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2017-12-06 06:50:48 +00:00
Michael Köhler
df3ae9e22d Pontoon: Update German (de) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Köhler <michael.koehler1@gmx.de>
2017-12-06 06:50:46 +00:00
Ton
52bffa024e Pontoon: Update Dutch (nl) localization of Test Pilot: Firefox Send
Localization authors:
- Ton <tonnes.mb@gmail.com>
2017-12-06 06:30:46 +00:00
Danny Coates
459499d5f5 fixed password ui 2017-12-05 19:41:53 -08:00
Pin-guang Chen
7cc94f6829 Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Test Pilot: Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2017-12-06 03:11:15 +00:00
Danny Coates
53d5b08559 rename number to num in ftl 2017-12-05 19:07:23 -08:00
Marco Aurélio
c517b074f1 Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marco Aurélio <fxhelp@yahoo.com>
2017-12-06 00:50:52 +00:00
Michael Wolf
503ba43ebc Pontoon: Update Sorbian, Upper (hsb) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2017-12-05 23:31:32 +00:00
manxmensch
b0755f4bc5 Pontoon: Update Malay (ms) localization of Test Pilot: Firefox Send
Localization authors:
- manxmensch <manxmensch@gmail.com>
2017-12-05 23:11:03 +00:00
Théo Chevalier
89ece1ec4c Pontoon: Update French (fr) localization of Test Pilot: Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
2017-12-05 23:11:00 +00:00
YFdyh000
9fcaefbd99 Pontoon: Update Chinese (China) (zh-CN) localization of Test Pilot: Firefox Send
Localization authors:
- YFdyh000 <yfdyh000@gmail.com>
2017-12-05 23:10:57 +00:00
Rodrigo
81f33c7bbd Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2017-12-05 22:51:14 +00:00
Georgianizator
0ce1bf2360 Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2017-12-05 22:51:10 +00:00
Danny Coates
bb10c1aa9d added 'report IP infringement' footer link 2017-12-05 14:16:22 -08:00
Danny Coates
b2c1daa6c7 color promo experiment 2017-12-05 14:06:40 -08:00
Danny Coates
da4338ed69 fixed ftl variable names 2017-12-05 12:58:48 -08:00
Danny Coates
1849d712b1 added ver to qsurvey url 2017-12-05 12:51:37 -08:00
Jordi Cuevas
28a7e0f717 Pontoon: Update Spanish (Spain) (es-ES) localization of Test Pilot: Firefox Send
Localization authors:
- avelper <avelper@mozilla-hispano.org>
- Jordi Cuevas <jordicuevas@gmail.com>
2017-12-05 19:51:18 +00:00
Andreas Pettersson
ddbfc79cae Pontoon: Update Swedish (sv-SE) localization of Test Pilot: Firefox Send
Localization authors:
- Andreas Pettersson <az@kth.se>
2017-12-05 19:10:53 +00:00
Marco Aurélio
ec8900d38f Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marco Aurélio <fxhelp@yahoo.com>
2017-12-05 17:10:33 +00:00
Michael Köhler
8aadd5d775 Pontoon: Update German (de) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Köhler <michael.koehler1@gmx.de>
2017-12-05 16:51:22 +00:00
Ton
268f9306d9 Pontoon: Update Dutch (nl) localization of Test Pilot: Firefox Send
Localization authors:
- Ton <tonnes.mb@gmail.com>
2017-12-05 16:30:45 +00:00
Francesco Lodolo
866552254c Pontoon: Update Italian (it) localization of Test Pilot: Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2017-12-05 15:10:38 +00:00
Kohei Yoshino
42f87424c6 Pontoon: Update Japanese (ja) localization of Test Pilot: Firefox Send
Localization authors:
- Kohei Yoshino <kohei.yoshino@gmail.com>
2017-12-05 14:30:41 +00:00
ravmn
4899fb27ec Pontoon: Update Spanish (Chile) (es-CL) localization of Test Pilot: Firefox Send
Localization authors:
- ravmn <ravmn@ravmn.cl>
2017-12-05 14:10:59 +00:00
Fjoerfoks
c2c8d2bdaa Pontoon: Update Frisian (fy-NL) localization of Test Pilot: Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2017-12-05 11:50:56 +00:00
Amin Mahmudian
daa373967f Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send
Localization authors:
- Amin Mahmudian <amin.mahmudian@gmail.com>
2017-12-05 11:30:57 +00:00
Fjoerfoks
dccc9bfbcd Pontoon: Update Frisian (fy-NL) localization of Test Pilot: Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2017-12-05 11:30:51 +00:00
Marko Andrejić
f51a873752 Pontoon: Update Serbian (sr) localization of Test Pilot: Firefox Send
Localization authors:
- Marko Andrejić <marko.andrejic93@gmail.com>
2017-12-05 10:50:52 +00:00
YFdyh000
bad5efc5e8 Pontoon: Update Chinese (China) (zh-CN) localization of Test Pilot: Firefox Send
Localization authors:
- YFdyh000 <yfdyh000@gmail.com>
2017-12-05 10:31:06 +00:00
Rodrigo
edf8384348 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2017-12-05 10:10:42 +00:00
manxmensch
65c2f0e191 Pontoon: Update Malay (ms) localization of Test Pilot: Firefox Send
Localization authors:
- manxmensch <manxmensch@gmail.com>
2017-12-05 10:10:40 +00:00
Rodrigo
427a09296c Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2017-12-05 09:50:40 +00:00
Georgianizator
ba11d62003 Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2017-12-05 09:30:37 +00:00
Balázs Meskó
900dbe781e Pontoon: Update Hungarian (hu) localization of Test Pilot: Firefox Send
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
2017-12-05 08:11:19 +00:00
Bjørn I
ee19aa8f2e Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Bjørn I. <bjorn.svindseth@online.no>
2017-12-05 07:30:40 +00:00
Nihad Suljić
e9cff66852 Pontoon: Update Bosnian (bs) localization of Test Pilot: Firefox Send
Localization authors:
- Nihad Suljić <nihad.suljic92@gmail.com>
2017-12-05 06:50:58 +00:00
Frederick Villaluna
f63894bea7 Pontoon: Update Tagalog (tl) localization of Test Pilot: Firefox Send
Localization authors:
- Frederick Villaluna <fv_comscie@yahoo.com>
2017-12-05 05:11:02 +00:00
Roberto Alvarado
35a285d71a Pontoon: Update Spanish (Mexico) (es-MX) localization of Test Pilot: Firefox Send
Localization authors:
- Roberto Alvarado <ralv888@gmail.com>
2017-12-05 04:11:10 +00:00
Pin-guang Chen
ba80b01150 Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Test Pilot: Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2017-12-05 04:11:08 +00:00
Théo Chevalier
c9be359db4 Pontoon: Update French (fr) localization of Test Pilot: Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
2017-12-05 03:50:56 +00:00
Danny Coates
46a3933dbb Merge pull request #654 from mozilla/multi
Multiple download UI
2017-12-04 19:29:03 -08:00
Danny Coates
7b4060f9e1 Added multiple download option 2017-12-04 15:52:31 -08:00
Danny Coates
beb3a6e67b Merge pull request #650 from ovlb/hotfix/ios-input-appearance
#634: overwrite appearance of password submit input
2017-11-28 11:45:06 -08:00
Alberto Castro
b393c35284 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Alberto Castro <albertdcastro@gmail.com>
2017-11-28 11:51:09 +00:00
Rodrigo
ad371553ba Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2017-11-24 13:31:30 +00:00
albertdcastro
0107fb9486 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- albertdcastro <albertdcastro@gmail.com>
2017-11-24 12:11:53 +00:00
Oscar
7cf70317e8 #634: overwrite appearance of password submit input
Bug: The button to set a password had a different look than other buttons on the site

Fix: add -webkit-appearance none on the button element to force browser to discard the default styling. For a reduced test case demonstrating the fix see https://codepen.io/ovl/full/qVYgoO/
2017-11-23 15:28:32 +01:00
Danny Coates
7d8aaac5d2 Merge pull request #649 from ovlb/hotfix/share-interface-button-alignment
#609 share interface: align text in input and button
2017-11-22 11:57:08 -08:00
Oscar
2b5f7d126f share interface: align text in input and button
Bug: Text in inout and button are not aligned on the middle axis

Fix: Add padding-bottom on the button elements to push their contents a bit higher
2017-11-22 20:36:22 +01:00
Théo Chevalier
3cbc71ca1b Pontoon: Update French (fr) localization of Test Pilot: Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
2017-11-17 02:30:26 +00:00
Tymur Faradzhev
9c4ac38a6c Pontoon: Update Ukrainian (uk) localization of Test Pilot: Firefox Send
Localization authors:
- Tymur Faradzhev <faradzhev.timur@gmail.com>
2017-11-16 21:51:21 +00:00
Arash Mousavi
9ae64a97ba Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send
Localization authors:
- Arash Mousavi <mousavi.arash@gmail.com>
2017-11-16 19:10:59 +00:00
Danny Coates
2807b1cad5 bump version to v2.1.2 2017-11-16 11:03:40 -08:00
Danny Coates
157e832c95 Merge pull request #645 from laurentj/patch-1
Remove the leak of the password into the console
2017-11-16 10:58:50 -08:00
Danny Coates
d78fcd3721 fixed promo position while ondrag is set. fixes 2017-11-16 10:50:29 -08:00
Radu Popescu
ac7ab79aef Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Radu Popescu <ra.mi.90@gmail.com>
- Jobava <jobaval10n@gmail.com>
2017-11-16 17:52:07 +00:00
Laurent Jouanneau
00fb353465 Remove the leak of the password into the console 2017-11-16 12:28:16 +01:00
Hyeonseok Shin
f0ec5a9496 Pontoon: Update Korean (ko) localization of Test Pilot: Firefox Send
Localization authors:
- Hyeonseok Shin <hyeonseok@gmail.com>
2017-11-16 05:51:26 +00:00
Danny Coates
7a31082da1 bump version to v2.1.1 2017-11-15 10:59:03 -08:00
Danny Coates
b54f4575ee allow inline styles. fixes #644 2017-11-15 10:54:13 -08:00
Danny Coates
490a1e88eb don't disable copy while setting password. fixes #638 2017-11-14 19:07:24 -08:00
Danny Coates
2f8a3c9904 Merge pull request #641 from mozilla/banners
Added experiment for firefox download promo
2017-11-14 18:59:21 -08:00
Danny Coates
e7fdf76120 Added experiment for firefox download promo 2017-11-14 12:24:54 -08:00
Sahithi
d0d41b743a Pontoon: Update Telugu (te) localization of Test Pilot: Firefox Send
Localization authors:
- Sahithi <sahithi.thinker@gmail.com>
2017-11-13 10:30:34 +00:00
Enol
a2995411d6 Pontoon: Update Asturian (ast) localization of Test Pilot: Firefox Send
Localization authors:
- Enol <enolp@softastur.org>
2017-11-11 16:30:55 +00:00
Merike Sell
3246c4a621 Pontoon: Update Estonian (et) localization of Test Pilot: Firefox Send
Localization authors:
- Merike Sell <merikes@gmail.com>
2017-11-11 14:10:36 +00:00
Juraj Cigáň
48faf929a4 Pontoon: Update Slovak (sk) localization of Test Pilot: Firefox Send
Localization authors:
- Juraj Cigáň <kusavica@gmail.com>
2017-11-10 22:50:36 +00:00
Danny Coates
b7f922a999 Merge pull request #640 from mozilla/i586
use fluent-langneg for subtag support
2017-11-10 13:01:20 -08:00
Danny Coates
bfcdf9340d use fluent-langneg for subtag support 2017-11-10 12:40:18 -08:00
Danny Coates
4ed515f5a3 updated deps 2017-11-09 15:07:03 -08:00
Danny Coates
84b2737ffb Merge pull request #639 from mozilla/i586
wrap number localization in try/catch
2017-11-09 14:17:11 -08:00
Danny Coates
deabca5a94 wrap number localization in try/catch 2017-11-09 13:58:20 -08:00
صفا الفليج
e9a49e23e8 Pontoon: Update Arabic (ar) localization of Test Pilot: Firefox Send
Localization authors:
- صفا الفليج <safa1996alfulaij@gmail.com>
2017-11-09 16:31:40 +00:00
81 changed files with 2664 additions and 1335 deletions

View File

@@ -1,6 +1,28 @@
import hash from 'string-hash';
const experiments = {};
const experiments = {
XnN0idVWSxO6A0kiNkxzGw: {
id: 'XnN0idVWSxO6A0kiNkxzGw',
run: function(variant, state, emitter) {
state.promo = variant === 1 ? 'blue' : 'grey';
emitter.emit('render');
},
eligible: function() {
return (
!/firefox/i.test(navigator.userAgent) &&
document.querySelector('html').lang === 'en-US'
);
},
variant: function(state) {
return this.luckyNumber(state) > 0.5 ? 1 : 0;
},
luckyNumber: function(state) {
return luckyNumber(
`${this.id}:${state.storage.get('testpilot_ga__cid')}`
);
}
}
};
//Returns a number between 0 and 1
// eslint-disable-next-line no-unused-vars
@@ -32,12 +54,12 @@ export default function initialize(state, emitter) {
checkExperiments(state, emitter);
});
} else {
const enrolled = state.storage.enrolled;
enrolled.forEach(([id, variant]) => {
const enrolled = state.storage.enrolled.filter(([id, variant]) => {
const xp = experiments[id];
if (xp) {
xp.run(variant, state, emitter);
}
return !!xp;
});
// single experiment per session for now
if (enrolled.length === 0) {

View File

@@ -97,6 +97,13 @@ export default function(state, emitter) {
lastRender = Date.now();
});
emitter.on('changeLimit', async ({ file, value }) => {
await FileSender.changeLimit(file.id, file.ownerToken, value);
file.dlimit = value;
state.storage.writeFiles();
metrics.changedDownloadLimit(file);
});
emitter.on('delete', async ({ file, location }) => {
try {
metrics.deletedUpload({
@@ -108,7 +115,7 @@ export default function(state, emitter) {
location
});
state.storage.remove(file.id);
await FileSender.delete(file.id, file.deleteToken);
await FileSender.delete(file.id, file.ownerToken);
} catch (e) {
state.raven.captureException(e);
}

View File

@@ -31,7 +31,6 @@ export default class FileReceiver extends Nanobus {
});
if (file.pwd) {
const encoder = new TextEncoder();
console.log(file.password + file.url);
this.authKeyPromise = window.crypto.subtle
.importKey(
'raw',
@@ -117,7 +116,8 @@ export default class FileReceiver extends Nanobus {
// TODO
}
fetchMetadata(sig) {
async fetchMetadata(nonce) {
const authHeader = await this.getAuthHeader(nonce);
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
@@ -127,13 +127,15 @@ export default class FileReceiver extends Nanobus {
if (xhr.status === 200) {
return resolve(xhr.response);
}
reject(new Error(xhr.status));
const err = new Error(xhr.status);
err.nonce = nonce;
reject(err);
}
};
xhr.onerror = () => reject(new Error(0));
xhr.ontimeout = () => reject(new Error(0));
xhr.open('get', `/api/metadata/${this.file.id}`);
xhr.setRequestHeader('Authorization', `send-v1 ${arrayToB64(sig)}`);
xhr.setRequestHeader('Authorization', authHeader);
xhr.responseType = 'json';
xhr.timeout = 2000;
xhr.send();
@@ -141,16 +143,18 @@ export default class FileReceiver extends Nanobus {
}
async getMetadata(nonce) {
let data = null;
try {
const authKey = await this.authKeyPromise;
const sig = await window.crypto.subtle.sign(
{
name: 'HMAC'
},
authKey,
b64ToArray(nonce)
);
const data = await this.fetchMetadata(new Uint8Array(sig));
try {
data = await this.fetchMetadata(nonce);
} catch (e) {
if (e.message === '401' && nonce !== e.nonce) {
// allow one retry for changed nonce
data = await this.fetchMetadata(e.nonce);
} else {
throw e;
}
}
const metaKey = await this.metaKeyPromise;
const json = await window.crypto.subtle.decrypt(
{
@@ -175,7 +179,8 @@ export default class FileReceiver extends Nanobus {
}
}
downloadFile(sig) {
async downloadFile(nonce) {
const authHeader = await this.getAuthHeader(nonce);
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
@@ -191,9 +196,10 @@ export default class FileReceiver extends Nanobus {
reject(new Error('notfound'));
return;
}
if (xhr.status !== 200) {
return reject(new Error(xhr.status));
const err = new Error(xhr.status);
err.nonce = xhr.getResponseHeader('WWW-Authenticate').split(' ')[1];
return reject(err);
}
const blob = new Blob([xhr.response]);
@@ -206,26 +212,39 @@ export default class FileReceiver extends Nanobus {
};
xhr.open('get', this.url);
xhr.setRequestHeader('Authorization', `send-v1 ${arrayToB64(sig)}`);
xhr.setRequestHeader('Authorization', authHeader);
xhr.responseType = 'blob';
xhr.send();
});
}
async getAuthHeader(nonce) {
const authKey = await this.authKeyPromise;
const sig = await window.crypto.subtle.sign(
{
name: 'HMAC'
},
authKey,
b64ToArray(nonce)
);
return `send-v1 ${arrayToB64(new Uint8Array(sig))}`;
}
async download(nonce) {
this.state = 'downloading';
this.emit('progress', this.progress);
try {
const encryptKey = await this.encryptKeyPromise;
const authKey = await this.authKeyPromise;
const sig = await window.crypto.subtle.sign(
{
name: 'HMAC'
},
authKey,
b64ToArray(nonce)
);
const ciphertext = await this.downloadFile(new Uint8Array(sig));
let ciphertext = null;
try {
ciphertext = await this.downloadFile(nonce);
} catch (e) {
if (e.message === '401' && nonce !== e.nonce) {
ciphertext = await this.downloadFile(e.nonce);
} else {
throw e;
}
}
this.msg = 'decryptingFile';
this.emit('decrypting');
const plaintext = await window.crypto.subtle.decrypt(

View File

@@ -1,6 +1,17 @@
import Nanobus from 'nanobus';
import { arrayToB64, b64ToArray, bytes } from './utils';
async function getAuthHeader(authKey, nonce) {
const sig = await window.crypto.subtle.sign(
{
name: 'HMAC'
},
authKey,
b64ToArray(nonce)
);
return `send-v1 ${arrayToB64(new Uint8Array(sig))}`;
}
export default class FileSender extends Nanobus {
constructor(file) {
super('FileSender');
@@ -35,7 +46,26 @@ export default class FileSender extends Nanobus {
}
};
xhr.send(JSON.stringify({ delete_token: token }));
xhr.send(JSON.stringify({ owner_token: token }));
});
}
static changeLimit(id, owner_token, dlimit) {
return new Promise((resolve, reject) => {
if (!id || !owner_token) {
return reject();
}
const xhr = new XMLHttpRequest();
xhr.open('POST', `/api/params/${id}`);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = () => {
if (xhr.readyState === XMLHttpRequest.DONE) {
resolve();
}
};
xhr.send(JSON.stringify({ owner_token, dlimit }));
});
}
@@ -100,7 +130,7 @@ export default class FileSender extends Nanobus {
url: responseObj.url,
id: responseObj.id,
secretKey: arrayToB64(this.rawSecret),
deleteToken: responseObj.delete,
ownerToken: responseObj.owner,
nonce
});
}
@@ -229,13 +259,7 @@ export default class FileSender extends Nanobus {
true,
['sign']
);
const sig = await window.crypto.subtle.sign(
{
name: 'HMAC'
},
authKey,
b64ToArray(file.nonce)
);
const authHeader = await getAuthHeader(authKey, file.nonce);
const pwdKey = await window.crypto.subtle.importKey(
'raw',
encoder.encode(password),
@@ -278,10 +302,7 @@ export default class FileSender extends Nanobus {
xhr.onerror = () => reject(new Error(0));
xhr.ontimeout = () => reject(new Error(0));
xhr.open('post', `/api/password/${file.id}`);
xhr.setRequestHeader(
'Authorization',
`send-v1 ${arrayToB64(new Uint8Array(sig))}`
);
xhr.setRequestHeader('Authorization', authHeader);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.responseType = 'json';
xhr.timeout = 2000;

View File

@@ -1,3 +1,4 @@
import 'fluent-intl-polyfill';
import app from './routes';
import locale from '../common/locales';
import fileManager from './fileManager';
@@ -47,4 +48,4 @@ app.use(fileManager);
app.use(dragManager);
app.use(experiments);
app.mount('#page-one');
app.mount('body');

View File

@@ -20,7 +20,7 @@ let experiment = null;
export default function initialize(state, emitter) {
appState = state;
emitter.on('DOMContentLoaded', () => {
addExitHandlers();
// addExitHandlers();
experiment = storage.enrolled[0];
sendEvent(category(), 'visit', {
cm5: storage.totalUploads,
@@ -29,6 +29,9 @@ export default function initialize(state, emitter) {
});
//TODO restart handlers... somewhere
});
emitter.on('exit', evt => {
exitEvent(evt);
});
}
function category() {
@@ -81,6 +84,8 @@ function urlToMetric(url) {
case 'https://testpilot.firefox.com/':
case 'https://testpilot.firefox.com/experiments/send':
return 'testpilot';
case 'https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com':
return 'promo';
default:
return 'other';
}
@@ -200,6 +205,16 @@ function stoppedUpload(params) {
});
}
function changedDownloadLimit(params) {
return sendEvent('sender', 'download-limit-changed', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cm8: params.dlimit
});
}
function completedDownload(params) {
return sendEvent('recipient', 'download-stopped', {
cm1: params.size,
@@ -244,6 +259,7 @@ function exitEvent(target) {
});
}
// eslint-disable-next-line no-unused-vars
function addExitHandlers() {
const links = Array.from(document.querySelectorAll('a'));
links.forEach(l => {
@@ -266,6 +282,7 @@ export {
cancelledUpload,
stoppedUpload,
completedUpload,
changedDownloadLimit,
deletedUpload,
startedDownload,
cancelledDownload,

View File

@@ -1,17 +1,43 @@
const choo = require('choo');
const html = require('choo/html');
const download = require('./download');
const header = require('../templates/header');
const footer = require('../templates/footer');
const fxPromo = require('../templates/fxPromo');
const app = choo();
app.route('/', require('./home'));
app.route('/share/:id', require('../templates/share'));
app.route('/download/:id', download);
app.route('/download/:id/:key', download);
app.route('/completed', require('../templates/completed'));
app.route('/unsupported/:reason', require('../templates/unsupported'));
app.route('/legal', require('../templates/legal'));
app.route('/error', require('../templates/error'));
app.route('/blank', require('../templates/blank'));
app.route('*', require('../templates/notFound'));
function body(template) {
return function(state, emit) {
const b = html`<body>
${state.promo ? fxPromo(state, emit) : ''}
${header(state)}
<div class="all">
<noscript>
<h2>Firefox Send requires JavaScript</h2>
<p><a href="https://github.com/mozilla/send/blob/master/docs/faq.md#why-does-firefox-send-require-javascript">Why does Firefox Send require JavaScript?</a></p>
<p>Please enable JavaScript and try again.</p>
</noscript>
${template(state, emit)}
</div>
${footer(state)}
</body>`;
if (state.layout) {
return state.layout(state, b);
}
return b;
};
}
app.route('/', body(require('./home')));
app.route('/share/:id', body(require('../templates/share')));
app.route('/download/:id', body(download));
app.route('/download/:id/:key', body(download));
app.route('/completed', body(require('../templates/completed')));
app.route('/unsupported/:reason', body(require('../templates/unsupported')));
app.route('/legal', body(require('../templates/legal')));
app.route('/error', body(require('../templates/error')));
app.route('/blank', body(require('../templates/blank')));
app.route('*', body(require('../templates/notFound')));
module.exports = app;

View File

@@ -1,9 +1,6 @@
const html = require('choo/html');
module.exports = function(state) {
module.exports = function() {
const div = html`<div id="page-one"></div>`;
if (state.layout) {
return state.layout(state, div);
}
return div;
};

View File

@@ -4,6 +4,7 @@ const { fadeOut } = require('../utils');
module.exports = function(state, emit) {
const div = html`
<div id="page-one">
<div id="download" class="fadeIn">
<div id="download-progress">
<div id="dl-title" class="title">${state.translate(
@@ -15,9 +16,10 @@ module.exports = function(state, emit) {
<div class="progress-text"></div>
</div>
</div>
<a class="send-new" data-state="completed" href="/" onclick=${sendNew}>${state.translate(
'sendYourFilesLink'
)}</a>
<a class="send-new" data-state="completed" href="/" onclick=${
sendNew
}>${state.translate('sendYourFilesLink')}</a>
</div>
</div>
`;

View File

@@ -5,6 +5,7 @@ const { bytes } = require('../utils');
module.exports = function(state) {
const transfer = state.transfer;
const div = html`
<div id="page-one">
<div id="download-progress" class="fadeIn">
<div id="dl-title" class="title">${state.translate(
'downloadingPageProgress',
@@ -21,6 +22,7 @@ module.exports = function(state) {
transfer.sizes
)}</div>
</div>
</div>
</div>
`;

View File

@@ -18,7 +18,9 @@ module.exports = function(file, state, emit) {
const remaining = timeLeft(ttl) || state.translate('linkExpiredAlt');
const row = html`
<tr id="${file.id}">
<td class="overflow-col" title="${file.name}">${file.name}</td>
<td class="overflow-col" title="${
file.name
}"><a class="link" href="/share/${file.id}">${file.name}</a></td>
<td class="center-col">
<img onclick=${copyClick} src="${assets.get(
'copy-16.svg'

34
app/templates/footer.js Normal file
View File

@@ -0,0 +1,34 @@
const html = require('choo/html');
const assets = require('../../common/assets');
module.exports = function(state) {
return html`<div class="footer">
<div class="legal-links">
<a href="https://www.mozilla.org" role="presentation"><img class="mozilla-logo" src="${assets.get(
'mozilla-logo.svg'
)}" alt="mozilla"/></a>
<a href="https://www.mozilla.org/about/legal">${state.translate(
'footerLinkLegal'
)}</a>
<a href="https://testpilot.firefox.com/about">${state.translate(
'footerLinkAbout'
)}</a>
<a href="/legal">${state.translate('footerLinkPrivacy')}</a>
<a href="/legal">${state.translate('footerLinkTerms')}</a>
<a href="https://www.mozilla.org/privacy/websites/#cookies">${state.translate(
'footerLinkCookies'
)}</a>
<a href="https://www.mozilla.org/about/legal/report-infringement/">${state.translate(
'reportIPInfringement'
)}</a>
</div>
<div class="social-links">
<a href="https://github.com/mozilla/send" role="presentation"><img class="github" src="${assets.get(
'github-icon.svg'
)}" alt="github"/></a>
<a href="https://twitter.com/FxTestPilot" role="presentation"><img class="twitter" src="${assets.get(
'twitter-icon.svg'
)}" alt="twitter"/></a>
</div>
</div>`;
};

46
app/templates/fxPromo.js Normal file
View File

@@ -0,0 +1,46 @@
const html = require('choo/html');
const assets = require('../../common/assets');
// function replaceLinks(str, urls) {
// let i = -1;
// const s = str.replace(/<a>([^<]+)<\/a>/g, (m, v) => {
// i++;
// return `<a class="link" href="${urls[i]}">${v}</a>`;
// });
// return [`<span>${s}</span>`];
// }
module.exports = function(state, emit) {
// function close() {
// document.querySelector('.banner').remove();
// }
function clicked(evt) {
emit('exit', evt);
}
const classes = state.promo === 'blue' ? 'banner banner-blue' : 'banner';
return html`
<div class="${classes}">
<div>
<img
src="${assets.get('firefox_logo-only.svg')}"
class="firefox-logo-small"
alt="Firefox"/>
<span>Send is brought to you by the all-new Firefox.
<a
class="link"
href="https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com"
onclick=${clicked}
>Download Firefox now ≫</a></span>
</div>
</div>`;
};
/*
<img
src="${assets.get('close-16.svg')}"
class="icon-delete"
onclick=${close}>
*/

33
app/templates/header.js Normal file
View File

@@ -0,0 +1,33 @@
const html = require('choo/html');
const assets = require('../../common/assets');
/*
The current weback config uses package.json to generate
version.json for /__version__ meaning `require` returns the
string 'version.json' in the frontend context but the json
on the server.
We want `version` to be constant at build time so this file
has a custom loader (/build/version_loader.js) just to replace
string with the value from package.json. 🤢
*/
const version = require('../../package.json').version || 'VERSION';
module.exports = function(state) {
return html`<header class="header">
<div class="send-logo">
<a href="/">
<img src="${assets.get(
'send_logo.svg'
)}" alt="Send"/><h1 class="site-title">Send</h1>
</a>
<div class="site-subtitle">
<a href="https://testpilot.firefox.com">Firefox Test Pilot</a>
<div>${state.translate('siteSubtitle')}</div>
</div>
</div>
<a href="https://qsurvey.mozilla.com/s3/txp-firefox-send?ver=${version}"
rel="noreferrer noopener"
class="feedback"
target="_blank">${state.translate('siteFeedback')}</a>
</header>`;
};

View File

@@ -30,9 +30,5 @@ module.exports = function(state) {
</div>
</div>
`;
if (state.layout) {
return state.layout(state, div);
}
return div;
};

View File

@@ -17,9 +17,5 @@ module.exports = function(state) {
)}</a>
</div>
</div>`;
if (state.layout) {
return state.layout(state, div);
}
return div;
};

View File

@@ -68,9 +68,5 @@ module.exports = function(state, emit) {
event.preventDefault();
emit('download', fileInfo);
}
if (state.layout) {
return state.layout(state, div);
}
return div;
};

View File

@@ -10,10 +10,18 @@ module.exports = function(progressRatio) {
const percent = Math.floor(progressRatio * 100);
const div = html`
<div class="progress-bar">
<svg id="progress" width="${oDiameter}" height="${oDiameter}" viewPort="0 0 ${oDiameter} ${oDiameter}" version="1.1">
<svg id="progress" width="${oDiameter}" height="${
oDiameter
}" viewPort="0 0 ${oDiameter} ${oDiameter}" version="1.1">
<circle r="${radius}" cx="${oRadius}" cy="${oRadius}" fill="transparent"/>
<circle id="bar" r="${radius}" cx="${oRadius}" cy="${oRadius}" fill="transparent" transform="rotate(-90 ${oRadius} ${oRadius})" stroke-dasharray="${circumference}" stroke-dashoffset="${dashOffset}"/>
<text class="percentage" text-anchor="middle" x="50%" y="98"><tspan class="percent-number">${percent}</tspan><tspan class="percent-sign">%</tspan></text>
<circle id="bar" r="${radius}" cx="${oRadius}" cy="${
oRadius
}" fill="transparent" transform="rotate(-90 ${oRadius} ${
oRadius
})" stroke-dasharray="${circumference}" stroke-dashoffset="${dashOffset}"/>
<text class="percentage" text-anchor="middle" x="50%" y="98"><tspan class="percent-number">${
percent
}</tspan><tspan class="percent-sign">%</tspan></text>
</svg>
</div>
`;

View File

@@ -0,0 +1,56 @@
const html = require('choo/html');
module.exports = function(selected, options, translate, changed) {
const id = `select-${Math.random()}`;
let x = selected;
function close() {
const ul = document.getElementById(id);
const body = document.querySelector('body');
ul.classList.remove('active');
body.removeEventListener('click', close);
}
function toggle(event) {
event.stopPropagation();
const ul = document.getElementById(id);
if (ul.classList.contains('active')) {
close();
} else {
ul.classList.add('active');
const body = document.querySelector('body');
body.addEventListener('click', close);
}
}
function choose(event) {
event.stopPropagation();
const target = event.target;
const value = +target.dataset.value;
target.parentNode.previousSibling.firstElementChild.textContent = translate(
value
);
if (x !== value) {
x = value;
changed(value);
}
close();
}
return html`
<div class="selectbox">
<div onclick=${toggle}>
<span class="link">${translate(selected)}</span>
<svg width="32" height="32">
<polygon points="8 18 17 28 26 18" fill="#0094fb"/>
</svg>
</div>
<ul id="${id}" class="selectOptions">
${options.map(
i =>
html`<li class="selectOption" onclick=${choose} data-value="${i}">${
i
}</li>`
)}
</ul>
</div>`;
};

View File

@@ -2,6 +2,7 @@ const html = require('choo/html');
const assets = require('../../common/assets');
const notFound = require('./notFound');
const uploadPassword = require('./uploadPassword');
const selectbox = require('./selectbox');
const { allowedCopy, delay, fadeOut } = require('../utils');
function passwordComplete(state, password) {
@@ -14,6 +15,24 @@ function passwordComplete(state, password) {
return el;
}
function expireInfo(file, translate, emit) {
const el = html([
`<div>${translate('expireInfo', {
downloadCount: '<select></select>',
timespan: translate('timespanHours', { num: 24 })
})}</div>`
]);
const select = el.querySelector('select');
const options = [1, 2, 3, 4, 5, 20];
const t = num => translate('downloadCount', { num });
const changed = value => emit('changeLimit', { file, value });
select.parentNode.replaceChild(
selectbox(file.dlimit || 1, options, t, changed),
select
);
return el;
}
module.exports = function(state, emit) {
const file = state.storage.getFileById(state.params.id);
if (!file) {
@@ -27,7 +46,7 @@ module.exports = function(state, emit) {
: uploadPassword(state, emit);
const div = html`
<div id="share-link" class="fadeIn">
<div class="title">${state.translate('uploadSuccessTimingHeader')}</div>
<div class="title">${expireInfo(file, state.translate, emit)}</div>
<div id="share-window">
<div id="copy-text">
${state.translate('copyUrlFormLabelWithName', {

View File

@@ -29,7 +29,7 @@ module.exports = function(state) {
<div class="description"><a href="https://github.com/mozilla/send/blob/master/docs/faq.md#why-is-my-browser-not-supported">${state.translate(
'notSupportedLink'
)}</a></div>
<a id="dl-firefox" href="https://www.mozilla.org/firefox/new/?scene=2">
<a id="dl-firefox" href="https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com">
<img src="${assets.get(
'firefox_logo-only.svg'
)}" class="firefox-logo" alt="Firefox"/>
@@ -42,9 +42,5 @@ module.exports = function(state) {
)}</div>
</div>`;
const div = html`<div id="page-one">${msg}</div>`;
if (state.layout) {
return state.layout(state, div);
}
return div;
};

View File

@@ -5,7 +5,9 @@ module.exports = function(state, emit) {
const div = html`
<div class="selectPassword">
<div id="addPasswordWrapper">
<input id="addPassword" type="checkbox" autocomplete="off" onchange=${togglePasswordInput}/>
<input id="addPassword" type="checkbox" autocomplete="off" onchange=${
togglePasswordInput
}/>
<label for="addPassword">
${state.translate('requirePasswordCheckbox')}</label>
</div>
@@ -41,10 +43,6 @@ module.exports = function(state, emit) {
document
.querySelector('.setPassword')
.classList.toggle('hidden', !boxChecked);
document
.getElementById('copy')
.classList.toggle('wait-password', boxChecked);
document.getElementById('copy-btn').disabled = boxChecked;
if (boxChecked) {
unlockInput.focus();
} else {

View File

@@ -67,9 +67,5 @@ module.exports = function(state, emit) {
await fadeOut('page-one');
emit('upload', { file, type: 'click' });
}
if (state.layout) {
return state.layout(state, div);
}
return div;
};

View File

@@ -105,19 +105,31 @@ function bytes(num) {
}
const exponent = Math.min(Math.floor(Math.log10(num) / 3), UNITS.length - 1);
const n = Number(num / Math.pow(1000, exponent));
const nStr = LOCALIZE_NUMBERS
? n.toLocaleString(navigator.languages, {
let nStr = n.toFixed(1);
if (LOCALIZE_NUMBERS) {
try {
const locale = document.querySelector('html').lang;
nStr = n.toLocaleString(locale, {
minimumFractionDigits: 1,
maximumFractionDigits: 1
})
: n.toFixed(1);
});
} catch (e) {
// fall through
}
}
return `${nStr}${UNITS[exponent]}`;
}
function percent(ratio) {
return LOCALIZE_NUMBERS
? ratio.toLocaleString(navigator.languages, { style: 'percent' })
: `${Math.floor(ratio * 100)}%`;
if (LOCALIZE_NUMBERS) {
try {
const locale = document.querySelector('html').lang;
return ratio.toLocaleString(locale, { style: 'percent' });
} catch (e) {
// fall through
}
}
return `${Math.floor(ratio * 100)}%`;
}
function allowedCopy() {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -8,7 +8,6 @@ html {
background-repeat: no-repeat;
background-position: center top;
height: 100%;
max-width: 1440px;
margin: auto;
}
@@ -130,7 +129,7 @@ body {
display: flex;
flex-direction: column;
justify-content: flex-start;
max-width: 630px;
max-width: 650px;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box;
@@ -213,7 +212,7 @@ a {
.upload-window {
border: 3px dashed rgba(0, 148, 251, 0.5);
margin: 0 auto;
margin: 0 auto 10px;
height: 255px;
border-radius: 4px;
display: flex;
@@ -227,7 +226,6 @@ a {
.upload-window.ondrag {
border: 5px dashed rgba(0, 148, 251, 0.5);
margin: 0 auto;
height: 251px;
transform: scale(1.04);
border-radius: 4.2px;
@@ -602,6 +600,7 @@ tbody {
color: white;
cursor: pointer;
font-size: 15px;
padding-bottom: 4px;
padding-left: 10px;
padding-right: 10px;
white-space: nowrap;
@@ -709,6 +708,10 @@ tbody {
width: 70px;
}
.firefox-logo-small {
width: 24px;
}
#dl-firefox,
#update-firefox {
margin-bottom: 181px;
@@ -766,7 +769,7 @@ tbody {
}
#download {
margin: 0 auto;
margin: 0 auto 30px;
display: flex;
justify-content: center;
align-items: center;
@@ -837,7 +840,11 @@ tbody {
border: 1px solid #0297f8;
color: white;
cursor: pointer;
/* Force flat button look */
-webkit-appearance: none;
font-size: 15px;
padding-bottom: 3px;
padding-left: 10px;
padding-right: 10px;
white-space: nowrap;
@@ -931,12 +938,11 @@ tbody {
#addPasswordWrapper label {
line-height: 20px;
cursor: pointer;
position: relative;
opacity: 0.6;
color: #737373;
}
#addPassword:checked + label {
opacity: 1;
color: #000;
}
#addPasswordWrapper label::before {
@@ -955,6 +961,85 @@ tbody {
background-position: 2px 1px;
}
.banner {
padding: 0 15px;
height: 48px;
background-color: #efeff1;
color: #4a4a4f;
font-size: 13px;
display: flex;
flex-direction: row;
align-content: center;
align-items: center;
justify-content: center;
}
.banner > div {
display: flex;
align-items: center;
margin: 0 auto;
}
.banner > div > span {
margin-left: 10px;
}
.banner-blue {
background-color: #0098f7;
color: #fff;
}
.banner-blue a {
color: #fff;
font-weight: bold;
}
.banner-blue a:hover {
color: #eee;
font-weight: bold;
}
.selectbox {
display: inline-block;
position: relative;
cursor: pointer;
}
.selectSelected {
cursor: pointer;
}
.selectOptions {
display: none;
}
.selectOptions.active {
display: block;
position: absolute;
top: 0;
left: 0;
padding: 0;
margin: 40px 0;
background-color: white;
border: 1px solid rgba(12, 12, 13, 0.3);
border-radius: 4px;
box-shadow: 1px 2px 4px rgba(12, 12, 13, 0.3);
}
.selectOption {
color: #737373;
font-size: 12pt;
list-style: none;
user-select: none;
white-space: nowrap;
padding: 0 60px;
border-bottom: 1px solid rgba(12, 12, 13, 0.3);
}
.selectOption:hover {
background-color: #f4f4f4;
}
@media (max-device-width: 992px), (max-width: 992px) {
.popup .popuptext {
left: auto;

5
build/version_loader.js Normal file
View File

@@ -0,0 +1,5 @@
const version = require('../package.json').version;
module.exports = function(source) {
return source.replace('VERSION', version);
};

View File

@@ -27,6 +27,7 @@ Data will be collected with Google Analytics and follow [Test Pilot standards](h
- `cm5` - the number of files the user has ever uploaded.
- `cm6` - the number of unexpired files the user has uploaded.
- `cm7` - the number of files the user has ever downloaded.
- `cm8` - the number of downloads permitted by the uploader.
### Custom Dimensions
- `cd1` - the method by which the user initiated an upload. One of `drag`, `click`.
@@ -67,6 +68,17 @@ Triggered whenever a user stops uploading a file. Includes:
- `cd2`
- `cd6`
#### `download-limit-changed`
Triggered whenever the sender changes the download limit. Includes:
- `ec` - `sender`
- `ea` - `download-limit-changed`
- `cm1`
- `cm5`
- `cm6`
- `cm7`
- `cm8`
#### `password-added`
Triggered whenever a password is added to a file. Includes:

2730
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "firefox-send",
"description": "File Sharing Experiment",
"version": "2.0.0",
"version": "2.2.0",
"author": "Mozilla (https://mozilla.org)",
"repository": "mozilla/send",
"homepage": "https://github.com/mozilla/send/",
@@ -43,68 +43,69 @@
"node": ">=8.2.0"
},
"devDependencies": {
"autoprefixer": "^7.1.5",
"autoprefixer": "^7.2.1",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-yo-yoify": "^1.0.1",
"babel-plugin-yo-yoify": "^1.0.2",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-env": "^1.6.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"base64-js": "^1.2.1",
"copy-webpack-plugin": "^4.1.1",
"cross-env": "^5.0.5",
"copy-webpack-plugin": "^4.2.3",
"cross-env": "^5.1.1",
"css-loader": "^0.28.7",
"css-mqpacker": "^6.0.1",
"cssnano": "^3.10.0",
"eslint": "^4.8.0",
"eslint": "^4.12.0",
"eslint-plugin-mocha": "^4.11.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-security": "^1.4.0",
"expose-loader": "^0.7.3",
"expose-loader": "^0.7.4",
"extract-loader": "^1.0.1",
"file-loader": "^1.1.5",
"fluent-intl-polyfill": "^0.1.0",
"git-rev-sync": "^1.9.1",
"github-changes": "^1.1.0",
"github-changes": "^1.1.1",
"html-loader": "^0.5.1",
"husky": "^0.14.3",
"lint-staged": "^4.2.3",
"lint-staged": "^4.3.0",
"mocha": "^3.5.3",
"nanobus": "^4.2.0",
"npm-run-all": "^4.1.1",
"postcss-loader": "^2.0.6",
"prettier": "^1.7.4",
"nanobus": "^4.3.1",
"npm-run-all": "^4.1.2",
"postcss-loader": "^2.0.9",
"prettier": "^1.8.2",
"proxyquire": "^1.8.0",
"raven-js": "^3.18.1",
"raven-js": "^3.20.1",
"redis-mock": "^0.20.0",
"require-from-string": "^2.0.1",
"rimraf": "^2.6.2",
"selenium-webdriver": "^3.6.0",
"sinon": "^4.0.1",
"sinon": "^4.1.2",
"string-hash": "^1.1.3",
"stylelint-config-standard": "^17.0.0",
"stylelint-no-unsupported-browser-features": "^1.0.1",
"supertest": "^3.0.0",
"testpilot-ga": "^0.3.0",
"val-loader": "^1.0.2",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1",
"val-loader": "^1.1.0",
"webpack": "^3.8.1",
"webpack-dev-server": "2.9.1",
"webpack-manifest-plugin": "^1.3.2",
"webpack-unassert-loader": "^1.2.0"
},
"dependencies": {
"aws-sdk": "^2.130.0",
"aws-sdk": "^2.162.0",
"body-parser": "^1.18.2",
"choo": "^6.4.2",
"choo": "^6.6.0",
"cldr-core": "^32.0.0",
"connect-busboy": "0.0.2",
"convict": "^4.0.1",
"express": "^4.16.2",
"express-request-language": "^1.1.12",
"fluent": "^0.4.1",
"fluent-langneg": "^0.1.0",
"helmet": "^3.8.2",
"helmet": "^3.9.0",
"mkdirp": "^0.5.1",
"mozlog": "^2.1.1",
"mozlog": "^2.2.0",
"raven": "^2.2.1",
"redis": "^2.8.0"
},
@@ -112,6 +113,7 @@
"en-US",
"ast",
"az",
"bs",
"ca",
"cak",
"cs",
@@ -132,6 +134,7 @@
"id",
"it",
"ja",
"ka",
"kab",
"ko",
"ms",
@@ -145,6 +148,7 @@
"sl",
"sr",
"sv-SE",
"tl",
"tr",
"uk",
"vi",

View File

@@ -76,3 +76,5 @@ footerLinkTerms = الشروط
footerLinkCookies = الكعكات
requirePasswordCheckbox = اطلب كلمة سر لتنزيل هذا الملف
addPasswordButton = أضِف كلمة سر
// This label is followed by the password needed to download a file
passwordResult = كلمة السر: { $password }

View File

@@ -87,3 +87,5 @@ footerLinkCookies = Cookies
requirePasswordCheckbox = Riquir una contraseña pa baxar esti ficheru
addPasswordButton = Amestar contraseña
passwordTryAgain = Contraseña incorreuta. Volvi tentalo.
// This label is followed by the password needed to download a file
passwordResult = Contraseña: { $password }

View File

@@ -25,6 +25,12 @@ uploadingFileNotification = Obavijesti me kada otpremanje bude gotovo.
uploadSuccessConfirmHeader = Spremno za slanje
uploadSvgAlt = Otpremi
uploadSuccessTimingHeader = Veza prema vašoj datoteci će isteći nakon prvog preuzimanja ili za 24 sata.
expireInfo = Link za vašu datoteku će isteći nakon { $downloadCount } ili { $timespan }.
downloadCount = { $num ->
[one] 1 preuzimanja
[few] { $num } preuzimanja
*[other] { $num } preuzimanja
}
copyUrlFormLabelWithName = Iskopirajte i podijelite vezu da biste poslali datoteku: { $filename }
copyUrlFormButton = Kopiraj u međuspremnik
copiedUrl = Kopirano!

View File

@@ -25,6 +25,11 @@ uploadingFileNotification = Upozornit, až bude nahrávání dokončeno.
uploadSuccessConfirmHeader = Připraveno k odeslání
uploadSvgAlt = Nahrát
uploadSuccessTimingHeader = Platnost odkazu na váš soubor vyprší po jeho prvním stažení, nebo po 24 hodinách.
timespanHours = { $num ->
[one] hodina
[few] hodiny
*[other] hodin
}
copyUrlFormLabelWithName = Zkopírujte a sdílejte odkaz na váš soubor: { $filename }
copyUrlFormButton = Zkopírovat do schránky
copiedUrl = Zkopírováno!

View File

@@ -25,6 +25,19 @@ uploadingFileNotification = Dweud pan fydd y llwytho wedi gorffen.
uploadSuccessConfirmHeader = Yn Barod i Anfon
uploadSvgAlt = Llwytho i Fyny
uploadSuccessTimingHeader = Bydd y ddolen i'ch ffeil y dod i ben ar ôl 1 llwytho neu o fewn 24 awr.
expireInfo = Bydd y ddolen i'ch ffeil yn dod i ben ym mhen { $downloadCount } neu { $timespan }.
downloadCount = { $num ->
[one] Llwyth i lawr
[two] Lwyth i lawr
[few] Llwyth i lawr
*[other] Llwyth i lawr
}
timespanHours = { $num ->
[one] awr
[two] awr
[few] awr
*[other] awr
}
copyUrlFormLabelWithName = Copïo a rhannu'r ddolen i anfon eich ffeil: { $filename }
copyUrlFormButton = Copïo i'r clipfwrdd
copiedUrl = Wedi eu copïo!
@@ -89,3 +102,4 @@ addPasswordButton = Ychwanegu Cyfrinair
passwordTryAgain = Cyfrinair anghywir. Ceisiwch eto.
// This label is followed by the password needed to download a file
passwordResult = Cyfrinair: { $password }
reportIPInfringement = Adrodd ar Gamddefnydd o'r IP

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Mich benachrichtigen, wenn der Upload abgeschlossen
uploadSuccessConfirmHeader = Bereit zum Senden
uploadSvgAlt = Hochladen
uploadSuccessTimingHeader = Der Link zu Ihrer Datei läuft nach einem Download oder in 24 Stunden ab.
expireInfo = Der Link zu Ihrer Datei läuft nach { $downloadCount } oder { $timespan } ab.
downloadCount = { $num ->
[one] einem Download
*[other] { $num } Downloads
}
timespanHours = { $num ->
[one] einer Stunde
*[other] { $num } Stunden
}
copyUrlFormLabelWithName = Kopieren und teilen Sie den Link, um Ihre Datei zu senden: { $filename }
copyUrlFormButton = In Zwischenablage kopieren
copiedUrl = Kopiert!
@@ -89,3 +98,4 @@ addPasswordButton = Passwort hinzufügen
passwordTryAgain = Falsches Passwort. Versuchen Sie es erneut.
// This label is followed by the password needed to download a file
passwordResult = Passwort: { $password }
reportIPInfringement = IP-Verletzung melden

View File

@@ -25,6 +25,19 @@ uploadingFileNotification = K wěsći daś, gaž nagraśe jo dokóńcone.
uploadSuccessConfirmHeader = Gótowy za słanje
uploadSvgAlt = Nagraś
uploadSuccessTimingHeader = Wótkaz k wašej dataji pó 1 ześěgnjenju abo 24 góźinach spadnjo.
expireInfo = Wótkaz k wašej dataji pó { $downloadCount } abo { $timespan } spadnjo.
downloadCount = { $num ->
[one] 1 ześěgnjenje
[two] { $num } ześěgnjeni
[few] { $num } ześěgnjenja
*[other] { $num } ześěgnjenjow
}
timespanHours = { $num ->
[one] 1 góźina
[two] { $num } góźinje
[few] { $num } góźiny
*[other] { $num } góźin
}
copyUrlFormLabelWithName = Kopěrujśo a źělśo wótkaz, aby swóju dataju pósłał: { $filename }
copyUrlFormButton = Do mjazywótkłada kopěrowaś
copiedUrl = Kopěrowany!
@@ -89,3 +102,4 @@ addPasswordButton = Gronidło pśidaś
passwordTryAgain = Wopacne gronidło. Wopytajśo hyšći raz.
// This label is followed by the password needed to download a file
passwordResult = Gronidło: { $password }
reportIPInfringement = Pśekśiwjenje IP k wěsći daś

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Notify me when the upload is complete.
uploadSuccessConfirmHeader = Ready to Send
uploadSvgAlt = Upload
uploadSuccessTimingHeader = The link to your file will expire after 1 download or in 24 hours.
expireInfo = The link to your file will expire after { $downloadCount } or { $timespan }.
downloadCount = { $num ->
[one] 1 download
*[other] { $num } downloads
}
timespanHours = { $num ->
[one] 1 hour
*[other] { $num } hours
}
copyUrlFormLabelWithName = Copy and share the link to send your file: { $filename }
copyUrlFormButton = Copy to clipboard
copiedUrl = Copied!
@@ -88,4 +97,5 @@ requirePasswordCheckbox = Require a password to download this file
addPasswordButton = Add password
passwordTryAgain = Incorrect password. Try again.
// This label is followed by the password needed to download a file
passwordResult = Password: { $password }
passwordResult = Password: { $password }
reportIPInfringement = Report IP Infringement

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Notificarme cuando la subida se complete.
uploadSuccessConfirmHeader = Listo para enviar
uploadSvgAlt = Subir
uploadSuccessTimingHeader = El enlace al archivo expirará después de 1 descarga o en 24 horas.
expireInfo = El enlace a tu archivo expirará después de { $downloadCount } o { $timespan }.
downloadCount = { $num ->
[one] 1 descarga
*[other] { $num } descargas
}
timespanHours = { $num ->
[one] 1 hora
*[other] { $num } horas
}
copyUrlFormLabelWithName = Copiá y compartí el enlace para enviar tu archivo: { $filename }
copyUrlFormButton = Copiar al portapapeles
copiedUrl = ¡Copiado!
@@ -89,3 +98,4 @@ addPasswordButton = Agregar contraseña
passwordTryAgain = Contraseña incorrecta. Intentá nuevamente.
// This label is followed by the password needed to download a file
passwordResult = Contraseña: { $password }
reportIPInfringement = Informar violación de propiedad intelectual

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Notificarme cuando la subida sea completada.
uploadSuccessConfirmHeader = Listo para enviar
uploadSvgAlt = Subir
uploadSuccessTimingHeader = El enlace a tu archivo expirará tras 1 descarga o en 24 horas.
expireInfo = El enlace a tu archivo expirará después de { $downloadCount } o { $timespan }.
downloadCount = { $num ->
[one] 1 descarga
*[other] { $num } descargas
}
timespanHours = { $num ->
[one] 1 hora
*[other] { $num } horas
}
copyUrlFormLabelWithName = Copia y comparte el enlace para enviar tu archivo: { $filename }
copyUrlFormButton = Copiar al portapapeles
copiedUrl = ¡Copiado!
@@ -89,3 +98,4 @@ addPasswordButton = Añadir contraseña
passwordTryAgain = Contraseña incorrecta. Vuelve a intentarlo.
// This label is followed by the password needed to download a file
passwordResult = Contraseña: { $password }
reportIPInfringement = Reportar infracción de PI

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Notificarme cuando se complete la subida.
uploadSuccessConfirmHeader = Listo para enviar
uploadSvgAlt = Subir
uploadSuccessTimingHeader = El enlace al archivo caducará tras descargarlo una vez o en 24 horas.
expireInfo = El enlace al archivo expirará tras { $downloadCount } o { $timespan }.
downloadCount = { $num ->
[one] 1 descarga
*[other] { $num } descargas
}
timespanHours = { $num ->
[one] 1 hora
*[other] { $num } horas
}
copyUrlFormLabelWithName = Copiar y compartir el enlace para enviar tu archivo: { $filename }
copyUrlFormButton = Copiar en el portapapeles
copiedUrl = ¡Copiado!

View File

@@ -25,6 +25,14 @@ uploadingFileNotification = Avísame cuando la subida del archivo esté completa
uploadSuccessConfirmHeader = Listo para enviar
uploadSvgAlt = Subir
uploadSuccessTimingHeader = El enlace a tu archivo expirará después de una descarga o en 24 horas.
expireInfo = El enlace a tu archivo expirará después de { $downloadCount } o { $timespan }.
downloadCount = { $num ->
*[one] 1 descarga
}
timespanHours = { $num ->
[one] 1 hora
*[other] { $num } horas
}
copyUrlFormLabelWithName = Copiar y compartir el enlace para enviar tu archivo: ($filename)
copyUrlFormButton = Copiar a portapapeles
copiedUrl = ¡Copiado!

View File

@@ -87,3 +87,5 @@ footerLinkCookies = Küpsistest
requirePasswordCheckbox = Selle faili allalaadimiseks nõutakse parooli
addPasswordButton = Lisa parool
passwordTryAgain = Vale parool. Palun proovi uuesti.
// This label is followed by the password needed to download a file
passwordResult = Parool: { $password }

View File

@@ -25,6 +25,13 @@ uploadingFileNotification = هر وقت بارگذاری تمام شد به من
uploadSuccessConfirmHeader = آماده برای ارسال
uploadSvgAlt = بارگذاری
uploadSuccessTimingHeader = پیوند به پرونده شما بعد از ۱ بار دانلود یا ۲۴ ساعت حذف خواهد شد.
expireInfo = این پیوند به فایل شما پس از { $downloadCount } یا { $timespan } منقضی خواهد شد.
downloadCount = { $num ->
*[other] ۱ بارگذاری
}
timespanHours = { $num ->
*[other] ۱ ساعت
}
copyUrlFormLabelWithName = برای ارسال پرونده پیوند آن را رونوشت و به اشتراک بگذارید: { $filename }
copyUrlFormButton = رونوشت به کلیپ‌بورد
copiedUrl = رونوشت شد!
@@ -87,3 +94,6 @@ footerLinkCookies = کوکی‌ها
requirePasswordCheckbox = دریافت این پرونده نیاز به گذرواژه دارد
addPasswordButton = افزودن گذرواژه
passwordTryAgain = کلمه عبور اشتباه است. مجدد تلاش کنید.
// This label is followed by the password needed to download a file
passwordResult = گذرواژه: { $password }
reportIPInfringement = گزارش تخلف IP

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Menvoyer une notification lorsque lenvoi est t
uploadSuccessConfirmHeader = Paré à lenvoi
uploadSvgAlt = Envoyer
uploadSuccessTimingHeader = Le lien vers votre fichier expirera après le premier téléchargement ou au bout de 24 heures.
expireInfo = Le lien vers votre fichier expirera après { $downloadCount } ou { $timespan }.
downloadCount = { $num ->
[one] 1 téléchargement
*[other] { $num } téléchargements
}
timespanHours = { $num ->
[one] 1 heure
*[other] { $num } heures
}
copyUrlFormLabelWithName = Copiez et partagez le lien pour envoyer votre fichier : { $filename }
copyUrlFormButton = Copier dans le presse-papiers
copiedUrl = Lien copié !
@@ -34,7 +43,7 @@ sendAnotherFileLink = Envoyer un autre fichier
downloadAltText = Télécharger
downloadFileName = Télécharger { $filename }
downloadFileSize = ({ $size })
unlockInputLabel = Saisissez un mot de passe
unlockInputLabel = Saisissez le mot de passe
unlockInputPlaceholder = Mot de passe
unlockButtonLabel = Déverrouiller
downloadFileTitle = Télécharger le fichier chiffré
@@ -89,3 +98,4 @@ addPasswordButton = Ajouter un mot de passe
passwordTryAgain = Mot de passe incorrect. Veuillez réessayer.
// This label is followed by the password needed to download a file
passwordResult = Mot de passe : { $password }
reportIPInfringement = Signaler une violation de la p.i.

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Jou in melding as de oplaad foltôge is.
uploadSuccessConfirmHeader = Ree om te ferstjoeren
uploadSvgAlt = Oplaad
uploadSuccessTimingHeader = De keppeling nei jo bestân sil nei 1 download ferrinne of nei 24 oeren.
expireInfo = De keppeling nei jo bestân sil nei { $downloadCount } of { $timespan } ferrinne.
downloadCount = { $num ->
[one] 1 download
*[other] { $num } downloads
}
timespanHours = { $num ->
[one] 1 oer
*[other] { $num } oeren
}
copyUrlFormLabelWithName = Kopiearje en diel de keppeling om jo bestân te ferstjoeren: { $filename }
copyUrlFormButton = Nei klamboerd kopiearje
copiedUrl = Kopiearre!

View File

@@ -25,6 +25,19 @@ uploadingFileNotification = Zdźělić, hdyž nahraće je dokónčene.
uploadSuccessConfirmHeader = Hotowy za słanje
uploadSvgAlt = Nahrać
uploadSuccessTimingHeader = Wotkaz k wašej dataji po 1 sćehnjenju abo 24 hodźinach spadnje.
expireInfo = Wotkaz k wašej dataji po { $downloadCount } abo { $timespan } spadnje.
downloadCount = { $num ->
[one] 1 sćehnjenje
[two] { $num } sćehnjeni
[few] { $num } sćehnjenja
*[other] { $num } sćehnjenjow
}
timespanHours = { $num ->
[one] 1 hodźina
[two] { $num } hodźinje
[few] { $num } hodźiny
*[other] { $num } hodźin
}
copyUrlFormLabelWithName = Kopěrujće a dźělće wotkaz, zo byšće swoju dataju pósłał: { $filename }
copyUrlFormButton = Do mjezyskłada kopěrować
copiedUrl = Kopěrowany!
@@ -89,3 +102,4 @@ addPasswordButton = Hesło přidać
passwordTryAgain = Wopačne hesło. Prošu spytajće hišće raz.
// This label is followed by the password needed to download a file
passwordResult = Hesło: { $password }
reportIPInfringement = Zranjenje IP zdźělić

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Értesítsen, ha a feltöltés elkészült.
uploadSuccessConfirmHeader = Küldésre kész
uploadSvgAlt = Feltöltés
uploadSuccessTimingHeader = A fájl hivatkozása lejár 1 letöltés vagy 24 óra múlva.
expireInfo = A fájlhoz tartozó hivatkozás { $downloadCount } vagy { $timespan } múlva lejár.
downloadCount = { $num ->
[one] 1 letöltés
*[other] { $num } letöltés
}
timespanHours = { $num ->
[one] 1 óra
*[other] { $num } óra
}
copyUrlFormLabelWithName = Másolja és ossza meg a hivatkozást a fájl küldéséhez: { $filename }
copyUrlFormButton = Vágólapra másolás
copiedUrl = Másolva!
@@ -89,3 +98,4 @@ addPasswordButton = Jelszó hozzáadása
passwordTryAgain = Helytelen jelszó. Próbálja meg újra.
// This label is followed by the password needed to download a file
passwordResult = Jelszó: { $password }
reportIPInfringement = Szellemi tulajdon megsértésének bejelentése

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Invia una notifica quando il caricamento è completa
uploadSuccessConfirmHeader = Pronto per linvio
uploadSvgAlt = Carica
uploadSuccessTimingHeader = Il link al file scadrà dopo 1 download o in 24 ore.
expireInfo = Il link a questo file scadrà dopo { $downloadCount } o { $timespan }.
downloadCount = { $num ->
[one] 1 download
*[other] { $num } download
}
timespanHours = { $num ->
[one] 1 ora
*[other] { $num } ore
}
copyUrlFormLabelWithName = Copia e condividi il link per inviare il tuo file: { $filename }
copyUrlFormButton = Copia negli appunti
copiedUrl = Copiato
@@ -89,3 +98,4 @@ addPasswordButton = Aggiungi password
passwordTryAgain = Password errata, riprovare.
// This label is followed by the password needed to download a file
passwordResult = Password: { $password }
reportIPInfringement = Segnala violazione della proprietà intellettuale

View File

@@ -25,6 +25,13 @@ uploadingFileNotification = アップロード完了時に通知を受け取る
uploadSuccessConfirmHeader = 送信準備完了
uploadSvgAlt = アップロード
uploadSuccessTimingHeader = ファイルへのリンクは、1 回ダウンロードされた後、もしくは 24 時間以内に期限切れとなります。
expireInfo = このファイルへのリンクは { $downloadCount } あるいは { $timespan } 後に期限切れとなります。
downloadCount = { $num ->
*[other] { $num } 回のダウンロード
}
timespanHours = { $num ->
*[other] { $num } 時間
}
copyUrlFormLabelWithName = ファイルを送信するにはこのリンクをコピー、共有してください: { $filename }
copyUrlFormButton = クリップボードへコピー
copiedUrl = コピー完了!
@@ -89,3 +96,4 @@ addPasswordButton = パスワードを追加
passwordTryAgain = パスワードが正しくありません。再度入力してください。
// This label is followed by the password needed to download a file
passwordResult = パスワード: { $password }
reportIPInfringement = 知的財産侵害報告

View File

@@ -25,6 +25,13 @@ uploadingFileNotification = შეტყობინება, ატვირ
uploadSuccessConfirmHeader = მზადაა გასაგზავნად
uploadSvgAlt = ატვირთვა
uploadSuccessTimingHeader = ფაილს ვადა გაუვა 1 ჩამოტვირთვის, ან 24 საათის მერე.
expireInfo = ფაილის ბმულს, ვადა გაუვა { $downloadCount }, ან { $timespan } მერე.
downloadCount = { $num ->
*[other] { $num } ჩამოტვირთვა
}
timespanHours = { $num ->
*[other] { $num } საათი
}
copyUrlFormLabelWithName = დააკოპირეთ და გააზიარეთ ბმული, ფაილის გასაგზავნად: { $filename }
copyUrlFormButton = დაკოპირება
copiedUrl = დაკოპირდა!
@@ -32,7 +39,7 @@ deleteFileButton = ფაილის წაშლა
sendAnotherFileLink = სხვა ფაილის გაგზავნა
// Alternative text used on the download link/button (indicates an action).
downloadAltText = ჩამოტვირთვა
downloadFileName = { $filename } ჩამოტვირთვა
downloadFileName = { $filename } ჩამოტვირთვა
downloadFileSize = ({ $size })
unlockInputLabel = შეიყვანეთ პაროლი
unlockInputPlaceholder = პაროლი
@@ -89,3 +96,4 @@ addPasswordButton = პაროლის დამატება
passwordTryAgain = პაროლი არასწორია. სცადეთ ხელახლა.
// This label is followed by the password needed to download a file
passwordResult = პაროლი: { $password }
reportIPInfringement = მოხსენება დარღვევაზე

View File

@@ -87,4 +87,6 @@ footerLinkTerms = 이용 약관
footerLinkCookies = 쿠키
requirePasswordCheckbox = 이 파일을 다운로드하려면 비밀번호가 필요함
addPasswordButton = 비밀번호 추가
incorrectPassword = 비밀번호가 일치하지 않습니다. 다시 시도해주세요.
passwordTryAgain = 비밀번호가 지 않습니다. 다시 시도해 주세요.
// This label is followed by the password needed to download a file
passwordResult = 비밀번호: { $password }

View File

@@ -25,6 +25,13 @@ uploadingFileNotification = Maklumkan saya apabila muat naik selesai.
uploadSuccessConfirmHeader = Sedia untuk Hantar
uploadSvgAlt = Muat naik
uploadSuccessTimingHeader = Pautan ke fail anda akan luput selepas 1 muat turun atau dalam 24 jam.
expireInfo = Pautan ke fail anda akan luput selepas { $downloadCount } atau { $timespan }.
downloadCount = { $num ->
*[other] { $num } muat turun
}
timespanHours = { $num ->
*[other] { $num } jam
}
copyUrlFormLabelWithName = Salin dan kongsi pautan untuk menghantar fail anda: { $filename }
copyUrlFormButton = Salin ke Klipbod
copiedUrl = Disalin!
@@ -89,3 +96,4 @@ addPasswordButton = Tambah Kata laluan
passwordTryAgain = Kata laluan tidak betul. Cuba lagi.
// This label is followed by the password needed to download a file
passwordResult = Kata laluan: { $password }
reportIPInfringement = Lapor Pencerobohan IP

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Varsle meg når opplastingen er ferdig.
uploadSuccessConfirmHeader = Klar til å sende
uploadSvgAlt = Last opp
uploadSuccessTimingHeader = Lenken til filen din utløper etter 1 nedlasting eller om 24 timer.
expireInfo = Lenken til filen din vil gå ut etter { $downloadCount } eller { $timespan }.
downloadCount = { $num ->
[one] 1 nedlasting
*[other] { $num } nedlastinger
}
timespanHours = { $num ->
[one] 1 time
*[other] { $num } timer
}
copyUrlFormLabelWithName = Kopier og del linken for å sende filen: { $filename }
copyUrlFormButton = Kopier til utklippstavle
copiedUrl = Kopiert!
@@ -89,3 +98,4 @@ addPasswordButton = Legg til passord
passwordTryAgain = Feil passord. Prøv igjen.
// This label is followed by the password needed to download a file
passwordResult = Passord: { $password }
reportIPInfringement = Rapporter brudd på åndsverk

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Mij waarschuwen zodra het uploaden is voltooid
uploadSuccessConfirmHeader = Gereed voor verzending
uploadSvgAlt = Uploaden
uploadSuccessTimingHeader = De koppeling naar uw bestand zal na 1 download of 24 uur verlopen.
expireInfo = De koppeling naar uw bestand zal na { $downloadCount } of { $timespan } verlopen.
downloadCount = { $num ->
[one] 1 download
*[other] { $num } downloads
}
timespanHours = { $num ->
[one] 1 uur
*[other] { $num } uur
}
copyUrlFormLabelWithName = Kopieer en deel de koppeling om uw bestand te verzenden: { $filename }
copyUrlFormButton = Kopiëren naar klembord
copiedUrl = Gekopieerd!
@@ -89,3 +98,4 @@ addPasswordButton = Wachtwoord toevoegen
passwordTryAgain = Onjuist wachtwoord. Probeer het opnieuw.
// This label is followed by the password needed to download a file
passwordResult = Wachtwoord: { $password }
reportIPInfringement = IE-inbreuk melden

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Varsle meg når opplastinga er ferdig.
uploadSuccessConfirmHeader = Klår til å senda
uploadSvgAlt = Last opp
uploadSuccessTimingHeader = Lenka til fila di går ut etter 1 nedlasting eller om 24 timar.
expireInfo = Lenka til fila di vil gå ut etter { $downloadCount } eller { $timespan }.
downloadCount = { $num ->
[one] 1 nedlasting
*[other] { $num } nedlastingar
}
timespanHours = { $num ->
[one] 1 time
*[other] { $num } timar
}
copyUrlFormLabelWithName = Kopier og del lenka for å sende fila: { $filename }
copyUrlFormButton = Kopier til utklippstavla
copiedUrl = Kopiert!
@@ -89,3 +98,4 @@ addPasswordButton = Legg til passord
passwordTryAgain = Feil passord. Prøv på nytt.
// This label is followed by the password needed to download a file
passwordResult = Passord: { $password }
reportIPInfringement = Rapporter brot på åndsverk

View File

@@ -25,6 +25,15 @@ uploadingFileNotification = Me avise quando completar o envio.
uploadSuccessConfirmHeader = Pronto para enviar
uploadSvgAlt = Enviado
uploadSuccessTimingHeader = O link para o seu arquivo expirará após 1 download ou em 24 horas.
expireInfo = O link para o seu arquivo expirará após { $downloadCount } ou { $timepan }.
downloadCount = { $num ->
[one] 1 download
*[other] { $num } downloads
}
timespanHours = { $num ->
[one] 1 hora
*[other] { $num } horas
}
copyUrlFormLabelWithName = Copie e compartilhe o link para enviar o seu arquivo: { $filename }
copyUrlFormButton = Copiar para área de transferência
copiedUrl = Copiado!
@@ -89,3 +98,4 @@ addPasswordButton = Adicionar senha
passwordTryAgain = Senha incorreta. Tente novamente.
// This label is followed by the password needed to download a file
passwordResult = Senha: { $password }
reportIPInfringement = Reportar violação de IP

View File

@@ -24,31 +24,37 @@ uploadingPageLargeFileMessage = Este ficheiro é grande e pode demorar um pouco
uploadingFileNotification = Notificar-me quando o carregamento estiver completo.
uploadSuccessConfirmHeader = Pronto para enviar
uploadSvgAlt = Carregar
uploadSuccessTimingHeader = A ligação para o seu ficheiro irá expirar depois de 1 descarga ou em 24 horas.
uploadSuccessTimingHeader = A ligação para o seu ficheiro irá expirar depois de 1 transferência ou em 24 horas.
expireInfo = A ligação para o seu ficheiro irá expirar depois de { $downloadCount } or { $timespan }.
downloadCount = { $num ->
[one] 1 transferência
*[other] { $num } transferências
}
timespanHours = 1 hora
copyUrlFormLabelWithName = Copie e partilhe a ligação para enviar o seu ficheiro: { $filename }
copyUrlFormButton = Copiar para a área de transferência
copiedUrl = Copiado!
deleteFileButton = Apagar ficheiro
sendAnotherFileLink = Enviar outro ficheiro
// Alternative text used on the download link/button (indicates an action).
downloadAltText = Descarregar
downloadFileName = Descarregar { $filename }
downloadAltText = Transferir
downloadFileName = Transferir { $filename }
downloadFileSize = ({ $size })
unlockInputLabel = Digitar palavra-passe
unlockInputPlaceholder = Palavra-passe
unlockButtonLabel = Desbloquear
downloadFileTitle = Descarregar ficheiro encriptado
downloadFileTitle = Transferir ficheiro encriptado
// Firefox Send is a brand name and should not be localized.
downloadMessage = O seu amigo está a enviar-lhe um ficheiro com o Firefox Send, um serviço que lhe permite partilhar ficheiro com uma ligação segura, privada e encriptada que expira automaticamente para garantir que as suas coisas não fiquem online para sempre.
// Text and title used on the download link/button (indicates an action).
downloadButtonLabel = Descarregar
downloadNotification = A sua descarga foi completada.
downloadFinish = Descarga completada
downloadButtonLabel = Transferir
downloadNotification = A sua transferência foi concluída.
downloadFinish = Transferência concluída
// This message is displayed when uploading or downloading a file, e.g. "(1,3 MB of 10 MB)".
fileSizeProgress = ({ $partialSize } de { $totalSize })
// Firefox Send is a brand name and should not be localized.
sendYourFilesLink = Tentar o Firefox Send
downloadingPageProgress = A descarregar { $filename } ({ $size })
sendYourFilesLink = Experimentar o Firefox Send
downloadingPageProgress = A transferir { $filename } ({ $size })
downloadingPageMessage = Por favor deixe este separador aberto enquanto obtemos o seu ficheiro e o desencriptamos.
errorAltText = Erro ao carregar
errorPageHeader = Algo correu mal.
@@ -63,7 +69,7 @@ notSupportedDetail = Infelizmente este navegador não suporta a tecnologia web q
notSupportedLink = Porque é que o meu navegador não é suportado?
notSupportedOutdatedDetail = Infelizmente esta versão do Firefox não suporta a tecnologia web que faz o Firefox Send funcionar. Precisa de atualizar o seu navegador.
updateFirefox = Atualizar o Firefox
downloadFirefoxButtonSub = Descarga gratuita
downloadFirefoxButtonSub = Transferência gratuita
uploadedFile = Ficheiro
copyFileList = Copiar URL
// expiryFileList is used as a column header
@@ -72,7 +78,7 @@ deleteFileList = Apagar
nevermindButton = Esquecer
legalHeader = Termos e privacidade
legalNoticeTestPilot = O Firefox Send é atualmente uma experiência do Test Pilot, e sujeita aos <a>Termos de serviço</a> e <a>Aviso de privacidade</a> do Test Pilot. Pode saber mais acerca desta experiência e a sua recolha de dados <a>aqui</a>.
legalNoticeMozilla = A utilização do website do Firefox Send está também sujeita ao <a>Aviso de privacidade dos websites</a> e <a>Termos de serviço dos websites</a> da Mozilla.
legalNoticeMozilla = A utilização do website do Firefox Send está também sujeita ao <a>Aviso de privacidade dos websites</a> e <a>Termos de utilização dos websites</a> da Mozilla.
deletePopupText = Apagar este ficheiro?
deletePopupYes = Sim
deletePopupCancel = Cancelar
@@ -84,8 +90,9 @@ footerLinkAbout = Acerca do Test Pilot
footerLinkPrivacy = Privacidade
footerLinkTerms = Termos
footerLinkCookies = Cookies
requirePasswordCheckbox = Requerer uma palavra-passe para descarregar este ficheiro
requirePasswordCheckbox = Requerer uma palavra-passe para transferir este ficheiro
addPasswordButton = Adicionar palavra-passe
passwordTryAgain = Palavra-passe incorreta. Tente novamente.
// This label is followed by the password needed to download a file
passwordResult = Palavra-passe: { $password }
reportIPInfringement = Reportar violação de PI

View File

@@ -4,7 +4,10 @@ siteSubtitle = un experiment web
siteFeedback = Feedback
uploadPageHeader = Partajare de fișiere privată și criptată
uploadPageLearnMore = Află mai multe
uploadPageDropMessage = Aruncă fișierul aici pentru a începe încărcarea.
uploadPageBrowseButton = Alege un fișier din calculator.
uploadPageBrowseButton1 = Selectează un fișier pentru încărcare
uploadPageMultipleFilesAlert = Încărcarea mai multor fișiere deodată sau a dosarelor nu este suportată.
uploadPageBrowseButtonTitle = Încarcă fișier
uploadingPageProgress = Se încarcă { $filename } ({ $size })
importingFile = Se importă…
@@ -15,6 +18,7 @@ notifyUploadDone = Încărcarea s-a finalizat.
uploadingPageMessage =
uploadingPageCancel = Anulează încărcarea
uploadCancelNotification = Încărcarea a fost anulată.
uploadingPageLargeFileMessage = Stai calm! Acest fișier este mare. S-ar putea să dureze un timp încărcarea.
uploadingFileNotification = Notifică-mă când încărcarea este încheiată.
uploadSuccessConfirmHeader = Pregătit pentru trimitere
uploadSvgAlt = Încarcă
@@ -27,8 +31,10 @@ sendAnotherFileLink = Trimite un alt fișier
downloadAltText = Descarcă
downloadFileName = Descarcă { $filename }
downloadFileSize = ({ $size })
unlockInputLabel = Introdu parola
unlockInputPlaceholder = Parolă
unlockButtonLabel = Deblochează
downloadFileTitle = Descarcă fișierul criptat
// Text and title used on the download link/button (indicates an action).
downloadButtonLabel = Descarcă
downloadNotification = Descărcarea s-a încheiat.
@@ -40,7 +46,9 @@ sendYourFilesLink = Încearcă Firefox Send
downloadingPageProgress = Se descarcă { $filename } ({ $size })
errorAltText = Eroare la încărcare
errorPageHeader = Ceva a mers prost!
errorPageMessage = A apărut o eroare la încărcarea fișierului.
errorPageLink = Trimite un alt fișier
fileTooBig = Acest fișier este prea mare. Trebuie să fie sub { $size }.
linkExpiredAlt = Link expirat
expiredPageHeader = Acest link a expirat sau nu a existat de la bun început!
notSupportedHeader = Browserul tău nu este suportat.
@@ -52,6 +60,7 @@ copyFileList = Copiază URL-ul
// expiryFileList is used as a column header
expiryFileList = Expiră în
deleteFileList = Șterge
nevermindButton = Uită
legalHeader = Termeni de utilizare și politica de confidențialitate
deletePopupText = Ștergi aceast fișier?
deletePopupYes = Da

View File

@@ -25,6 +25,17 @@ uploadingFileNotification = Оповестить меня, когда загру
uploadSuccessConfirmHeader = Готов к отправке
uploadSvgAlt = Загрузить
uploadSuccessTimingHeader = Ссылка на ваш файл станет недоступна после 1 загрузки файла или через 24 часа.
expireInfo = Ссылка на ваш файл станет недоступна после { $downloadCount } файла или через { $timespan }.
downloadCount = { $num ->
[one] { $number } загрузки
[few] { $number } загрузок
*[other] { $number } загрузок
}
timespanHours = { $num ->
[one] { $number } час
[few] { $number } часа
*[other] { $number } часов
}
copyUrlFormLabelWithName = Скопировать и поделиться ссылкой на отправку вашего файла: { $filename }
copyUrlFormButton = Скопировать в буфер обмена
copiedUrl = Скопировано!
@@ -89,3 +100,4 @@ addPasswordButton = Добавить пароль
passwordTryAgain = Неверный пароль. Попробуйте снова.
// This label is followed by the password needed to download a file
passwordResult = Пароль: { $password }
reportIPInfringement = Сообщить о нарушении прав на интеллектуальную собственность

View File

@@ -87,3 +87,5 @@ footerLinkCookies = Cookies
requirePasswordCheckbox = Pri preberaní súboru vyžadovať heslo
addPasswordButton = Pridať heslo
passwordTryAgain = Nesprávne heslo. Skúste to znova.
// This label is followed by the password needed to download a file
passwordResult = Heslo: { $password }

View File

@@ -25,6 +25,19 @@ uploadingFileNotification = Obvesti me, ko bo nalaganje končano.
uploadSuccessConfirmHeader = Pripravljeno za pošiljanje
uploadSvgAlt = Naloži
uploadSuccessTimingHeader = Povezava do vaše datoteke bo potekla po enem prenosu ali v 24 urah.
expireInfo = Povezava do vaše datoteke bo potekla čez { $downloadCount } ali { $timespan }.
downloadCount = { $num ->
[one] 1 prenos
[two] { $num } prenosa
[few] { $num } prenosi
*[other] { $num } prenosov
}
timespanHours = { $num ->
[one] 1 ura
[two] { $num } uri
[few] { $num } ure
*[other] { $num } ur
}
copyUrlFormLabelWithName = Kopirajte in delite to povezavo, da pošljete datoteko: { $filename }
copyUrlFormButton = Kopiraj v odložišče
copiedUrl = Kopirano!
@@ -89,3 +102,4 @@ addPasswordButton = Dodaj geslo
passwordTryAgain = Napačno geslo. Poskusite znova.
// This label is followed by the password needed to download a file
passwordResult = Geslo: { $password }
reportIPInfringement = Prijavite kršitev naslova IP

View File

@@ -25,6 +25,17 @@ uploadingFileNotification = Обавести ме када се отпремањ
uploadSuccessConfirmHeader = Спреман за слање
uploadSvgAlt = Отпреми
uploadSuccessTimingHeader = Веза ка вашој датотеци ће истећи након једног преузимања или након 24 сата.
expireInfo = Веза ка вашој датотеци ће истећи након { $downloadCount } или { $timespan }.
downloadCount = { $num ->
[one] преузимања
[few] преузимања
*[other] преузимања
}
timespanHours = { $num ->
[one] сата
[few] сата
*[other] сати
}
copyUrlFormLabelWithName = Ископирајте и поделите везу да бисте послали вашу датотеку: { $filename }
copyUrlFormButton = Копирај у оставу
copiedUrl = Ископирано!
@@ -89,3 +100,4 @@ addPasswordButton = Додај лозинку
passwordTryAgain = Нетачна лозинка. Пробајте поново.
// This label is followed by the password needed to download a file
passwordResult = Лозинка: { $password }
reportIPInfringement = Пријавите IP прекршај

View File

@@ -25,6 +25,11 @@ uploadingFileNotification = Meddela mig när uppladdningen är klar.
uploadSuccessConfirmHeader = Klar för att skicka
uploadSvgAlt = Ladda upp
uploadSuccessTimingHeader = Länken till din fil upphör att gälla efter 1 nedladdning eller om 24 timmar.
expireInfo = Länken till din fil upphör att gälla efter { $downloadCount } eller { $timespan }.
timespanHours = { $num ->
[one] 1 timme
*[other] { $num } timmar
}
copyUrlFormLabelWithName = Kopiera och dela länken för att skicka din fil: { $filename }
copyUrlFormButton = Kopiera till urklipp
copiedUrl = Kopierad!

View File

@@ -31,6 +31,9 @@ sendAnotherFileLink = మరో ఫైలును పంపండి
downloadAltText = దిగుమతి
downloadFileName = దిగుమతి { $filename }
downloadFileSize = ({ $size })
unlockInputLabel = సంకేతపదాన్ని తెలపండి
unlockInputPlaceholder = సంకేతపదం
unlockButtonLabel = తాళం తీయి
// Text and title used on the download link/button (indicates an action).
downloadButtonLabel = దిగుమతి
downloadNotification = మీ దిగుమతి పూర్తయ్యింది.
@@ -69,3 +72,8 @@ footerLinkAbout = టెస్ట్ పైలట్ గురించి
footerLinkPrivacy = గోప్యత
footerLinkTerms = నియమాలు
footerLinkCookies = కుకీలు
requirePasswordCheckbox = ఈ ఫైల్ను దింపుకోటానికి సంకేతపదం అవసరం
addPasswordButton = సంకేతపదం జోడించండి
passwordTryAgain = సరికాని సంకేతపదం. మళ్ళీ ప్రయత్నించండి.
// This label is followed by the password needed to download a file
passwordResult = సంకేతపదం: { $password }

View File

@@ -25,6 +25,14 @@ uploadingFileNotification = Abisuhan ako kapag nakumpleto na ang pag-upload.
uploadSuccessConfirmHeader = Handa nang Ipadala
uploadSvgAlt = I-upload
uploadSuccessTimingHeader = Mag-e-expire ang link sa iyong file pagkatapos ng 1 pag-download o sa loob ng 24 na oras.
expireInfo = Mag-e-expire ang link sa iyong file pagkatapos ng { $downloadCount } o { $timespan }.
downloadCount = { $num ->
[one] 1 pag-download
*[other] { $num } na mga pag-download
}
timespanHours = { $num ->
*[one] 1 oras
}
copyUrlFormLabelWithName = Kopyahin at ibahagi ang link upang ipadala ang iyong file: { $filename }
copyUrlFormButton = Kopyahin sa clipboard
copiedUrl = Naikopya!
@@ -67,7 +75,7 @@ downloadFirefoxButtonSub = Libreng Download
uploadedFile = File
copyFileList = Kopyahin ang URL
// expiryFileList is used as a column header
expiryFileList = Magtatapos Sa
expiryFileList = Magtatapos Sa
deleteFileList = I-delete
nevermindButton = Hindi bale
legalHeader = Mga Tuntunin at Pagkapribado

View File

@@ -25,6 +25,11 @@ uploadingFileNotification = Yükleme bitince bana haber ver.
uploadSuccessConfirmHeader = Göndermeye hazır
uploadSvgAlt = Yükle
uploadSuccessTimingHeader = Dosyanız 1 kez indirildikten veya 24 saat geçtikten sonra linkiniz geçersiz olacaktır.
expireInfo = Dosyanızın bağlantısı { $downloadCount } sonra veya { $timespan } zaman aşımına uğrayacaktır.
downloadCount = { $num } indirme
timespanHours = { $num ->
*[one] { $num } saat
}
copyUrlFormLabelWithName = { $filename } dosyanızı başkasına göndermek için aşağıdaki linki kopyalayın.
copyUrlFormButton = Panoya kopyala
copiedUrl = Kopyalandı!
@@ -89,3 +94,4 @@ addPasswordButton = Parola ekle
passwordTryAgain = Yanlış parola. Yeniden deneyin.
// This label is followed by the password needed to download a file
passwordResult = Parola: { $password }
reportIPInfringement = Telif hakkı ihlali bildir

View File

@@ -34,6 +34,10 @@ sendAnotherFileLink = Надіслати інший файл
downloadAltText = Завантаживи
downloadFileName = Завантажити { $filename }
downloadFileSize = ({ $size })
unlockInputLabel = Введіть пароль
unlockInputPlaceholder = Пароль
unlockButtonLabel = Розблокувати
downloadFileTitle = Завантажити зашифрований файл
// Firefox Send is a brand name and should not be localized.
downloadMessage = Ваш друг надіслав файл за допомогою Firefox Send, який дозволяє ділитися файлами, використовуючи безпечні, приватні та зашифровані посилання, термін дії яких автоматично закінчується, щоб ваші файли не лишилися в Інтернеті назавжди.
// Text and title used on the download link/button (indicates an action).
@@ -80,3 +84,8 @@ footerLinkAbout = Про Test Pilot
footerLinkPrivacy = Приватність
footerLinkTerms = Умови
footerLinkCookies = Куки
requirePasswordCheckbox = Вимагати пароль для завантаження цього файлу
addPasswordButton = Додати пароль
passwordTryAgain = Невірний пароль. Спробуйте знову.
// This label is followed by the password needed to download a file
passwordResult = Пароль: { $password }

View File

@@ -25,6 +25,13 @@ uploadingFileNotification = 上传完成后通知我。
uploadSuccessConfirmHeader = 准备好发送
uploadSvgAlt = 上传
uploadSuccessTimingHeader = 您的文件的链接将在首次下载或 24 小时后过期。
expireInfo = 指向该文件的链接将在 { $downloadCount } 或 { $timespan } 后过期。
downloadCount = { $num ->
*[other] { $num } 次下载
}
timespanHours = { $num ->
*[other] { $num } 小时
}
copyUrlFormLabelWithName = 复制并分享链接以发送您的文件:{ $filename }
copyUrlFormButton = 复制到剪贴板
copiedUrl = 已复制!
@@ -89,3 +96,4 @@ addPasswordButton = 添加密码
passwordTryAgain = 密码不正确。请重试。
// This label is followed by the password needed to download a file
passwordResult = 密码:{ $password }
reportIPInfringement = 举报知识产权侵权

View File

@@ -25,6 +25,13 @@ uploadingFileNotification = 上傳完成時通知我。
uploadSuccessConfirmHeader = 準備好傳送
uploadSvgAlt = 上傳
uploadSuccessTimingHeader = 您的檔案鏈結將會在首次下載,或 24 小時後失效。
expireInfo = 檔案鏈結將在 { $downloadCount }或 { $timespan }後失效。
downloadCount = { $num ->
*[other] { $num } 次下載
}
timespanHours = { $num ->
*[other] { $num } 小時
}
copyUrlFormLabelWithName = 複製並分享鏈結來傳送您的檔案: { $filename }
copyUrlFormButton = 複製到剪貼簿
copiedUrl = 已複製!
@@ -89,3 +96,4 @@ addPasswordButton = 新增密碼
passwordTryAgain = 密碼不正確,請再試一次。
// This label is followed by the password needed to download a file
passwordResult = 密碼: { $password }
reportIPInfringement = 回報智慧財產權濫用情況

View File

@@ -4,11 +4,9 @@ const fs = require('fs');
const path = require('path');
function allLangs() {
const langs = fs.readdirSync(
return fs.readdirSync(
path.join(__dirname, '..', 'dist', 'public', 'locales')
);
langs.unshift('en-US'); // default first, TODO change for fluent-langneg
return langs;
}
if (config.l10n_dev) {

View File

@@ -8,7 +8,7 @@ module.exports = function(state, body = '') {
: '';
return html`
<!DOCTYPE html>
<html>
<html lang="${state.locale}">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8" />
@@ -31,7 +31,7 @@ module.exports = function(state, body = '') {
<title>${state.title}</title>
<link rel="stylesheet" type="text/css" href="${assets.get('main.css')}" />
<!-- generic favicons -->
<link rel="icon" href="${assets.get('favicon-32.png')}" sizes="32x32">
<link rel="icon" href="${assets.get('favicon-96.png')}" sizes="96x96">
@@ -62,8 +62,8 @@ module.exports = function(state, body = '') {
<!— Windows 8.1 + IE11 and above —>
<meta name="msapplication-config" content="/browserconfig.xml"/>
${firaTag}
<script defer src="/jsconfig.js"></script>
<script defer src="${assets.get('runtime.js')}"></script>
@@ -71,58 +71,7 @@ module.exports = function(state, body = '') {
<script defer src="${locales.get(state.locale)}"></script>
<script defer src="${assets.get('app.js')}"></script>
</head>
<body>
<header class="header">
<div class="send-logo">
<a href="/">
<img src="${assets.get(
'send_logo.svg'
)}" alt="Send"/><h1 class="site-title">Send</h1>
</a>
<div class="site-subtitle">
<a href="https://testpilot.firefox.com">Firefox Test Pilot</a>
<div>${state.translate('siteSubtitle')}</div>
</div>
</div>
<a href="https://qsurvey.mozilla.com/s3/txp-firefox-send" rel="noreferrer noopener" class="feedback" target="_blank">${state.translate(
'siteFeedback'
)}</a>
</header>
<div class="all">
<noscript>
<h2>Firefox Send requires JavaScript</h2>
<p><a href="https://github.com/mozilla/send/blob/master/docs/faq.md#why-does-firefox-send-require-javascript">Why does Firefox Send require JavaScript?</a></p>
<p>Please enable JavaScript and try again.</p>
</noscript>
${body}
</div>
<div class="footer">
<div class="legal-links">
<a href="https://www.mozilla.org" role="presentation"><img class="mozilla-logo" src="${assets.get(
'mozilla-logo.svg'
)}" alt="mozilla"/></a>
<a href="https://www.mozilla.org/about/legal">${state.translate(
'footerLinkLegal'
)}</a>
<a href="https://testpilot.firefox.com/about">${state.translate(
'footerLinkAbout'
)}</a>
<a href="/legal">${state.translate('footerLinkPrivacy')}</a>
<a href="/legal">${state.translate('footerLinkTerms')}</a>
<a href="https://www.mozilla.org/privacy/websites/#cookies">${state.translate(
'footerLinkCookies'
)}</a>
</div>
<div class="social-links">
<a href="https://github.com/mozilla/send" role="presentation"><img class="github" src="${assets.get(
'github-icon.svg'
)}" alt="github"/></a>
<a href="https://twitter.com/FxTestPilot" role="presentation"><img class="twitter" src="${assets.get(
'twitter-icon.svg'
)}" alt="twitter"/></a>
</div>
</div>
</body>
${body}
</html>
`;
};

View File

@@ -12,15 +12,15 @@ module.exports = async function(req, res) {
return;
}
const delete_token = req.body.delete_token;
const ownerToken = req.body.owner_token || req.body.delete_token;
if (!delete_token) {
if (!ownerToken) {
res.sendStatus(404);
return;
}
try {
const err = await storage.delete(id, delete_token);
const err = await storage.delete(id, ownerToken);
if (!err) {
res.sendStatus(200);
}

View File

@@ -19,12 +19,12 @@ module.exports = async function(req, res) {
const hmac = crypto.createHmac('sha256', Buffer.from(meta.auth, 'base64'));
hmac.update(Buffer.from(meta.nonce, 'base64'));
const verifyHash = hmac.digest();
const nonce = crypto.randomBytes(16).toString('base64');
storage.setField(id, 'nonce', nonce);
if (!verifyHash.equals(Buffer.from(auth, 'base64'))) {
res.set('WWW-Authenticate', `send-v1 ${nonce}`);
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
return res.sendStatus(401);
}
const nonce = crypto.randomBytes(16).toString('base64');
storage.setField(id, 'nonce', nonce);
const contentLength = await storage.length(id);
res.writeHead(200, {
'Content-Disposition': 'attachment',
@@ -36,10 +36,16 @@ module.exports = async function(req, res) {
const file_stream = storage.get(id);
file_stream.on('end', async () => {
const dl = (+meta.dl || 0) + 1;
const dlimit = +meta.dlimit || 1;
try {
await storage.forceDelete(id);
if (dl >= dlimit) {
await storage.forceDelete(id);
} else {
await storage.setField(id, 'dl', dl);
}
} catch (e) {
log.info('DeleteError:', id);
log.info('StorageError:', id);
}
});

View File

@@ -1,20 +1,40 @@
const busboy = require('connect-busboy');
const helmet = require('helmet');
const bodyParser = require('body-parser');
const requestLanguage = require('express-request-language');
const languages = require('../languages');
const storage = require('../storage');
const config = require('../config');
const pages = require('./pages');
// const lang = require('fluent-langneg')
const { negotiateLanguages } = require('fluent-langneg');
const IS_DEV = config.env === 'development';
const acceptLanguages = /(([a-zA-Z]+(-[a-zA-Z0-9]+){0,2})|\*)(;q=[0-1](\.[0-9]+)?)?/g;
const langData = require('cldr-core/supplemental/likelySubtags.json');
module.exports = function(app) {
app.use(
requestLanguage({
languages
})
);
app.use(function(req, res, next) {
const header = req.headers['accept-language'] || 'en-US';
if (header.length > 255) {
req.language = 'en-US';
return next();
}
const langs = header.replace(/\s/g, '').match(acceptLanguages);
const preferred = langs
.map(l => {
const parts = l.split(';');
return {
locale: parts[0],
q: parts[1] ? parseFloat(parts[1].split('=')[1]) : 1
};
})
.sort((a, b) => b.q - a.q)
.map(x => x.locale);
req.language = negotiateLanguages(preferred, languages, {
strategy: 'lookup',
likelySubtags: langData.supplemental.likelySubtags,
defaultLocale: 'en-US'
})[0];
next();
});
app.use(helmet());
app.use(
helmet.hsts({
@@ -34,7 +54,11 @@ module.exports = function(app) {
],
imgSrc: ["'self'", 'https://www.google-analytics.com'],
scriptSrc: ["'self'"],
styleSrc: ["'self'", 'https://code.cdn.mozilla.net'],
styleSrc: [
"'self'",
"'unsafe-inline'",
'https://code.cdn.mozilla.net'
],
fontSrc: ["'self'", 'https://code.cdn.mozilla.net'],
formAction: ["'none'"],
frameAncestors: ["'none'"],
@@ -70,6 +94,7 @@ module.exports = function(app) {
app.post('/api/upload', require('./upload'));
app.post('/api/delete/:id', require('./delete'));
app.post('/api/password/:id', require('./password'));
app.post('/api/params/:id', require('./params'));
app.get('/__version__', function(req, res) {
res.sendFile(require.resolve('../../dist/version.json'));

View File

@@ -17,12 +17,14 @@ module.exports = async function(req, res) {
const hmac = crypto.createHmac('sha256', Buffer.from(meta.auth, 'base64'));
hmac.update(Buffer.from(meta.nonce, 'base64'));
const verifyHash = hmac.digest();
if (!verifyHash.equals(Buffer.from(auth, 'base64'))) {
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
return res.sendStatus(401);
}
const nonce = crypto.randomBytes(16).toString('base64');
storage.setField(id, 'nonce', nonce);
res.set('WWW-Authenticate', `send-v1 ${nonce}`);
if (!verifyHash.equals(Buffer.from(auth, 'base64'))) {
return res.sendStatus(401);
}
const size = await storage.length(id);
const ttl = await storage.ttl(id);
res.send({

32
server/routes/params.js Normal file
View File

@@ -0,0 +1,32 @@
const storage = require('../storage');
function validateID(route_id) {
return route_id.match(/^[0-9a-fA-F]{10}$/) !== null;
}
module.exports = async function(req, res) {
const id = req.params.id;
if (!validateID(id)) {
return res.sendStatus(404);
}
const ownerToken = req.body.owner_token;
if (!ownerToken) {
return res.sendStatus(400);
}
const dlimit = req.body.dlimit;
if (!dlimit || dlimit > 20) {
return res.sendStatus(400);
}
try {
const meta = await storage.metadata(id);
if (meta.owner !== ownerToken) {
return res.sendStatus(400);
}
storage.setField(id, 'dlimit', dlimit);
res.sendStatus(200);
} catch (e) {
res.sendStatus(404);
}
};

View File

@@ -20,12 +20,13 @@ module.exports = async function(req, res) {
const hmac = crypto.createHmac('sha256', Buffer.from(meta.auth, 'base64'));
hmac.update(Buffer.from(meta.nonce, 'base64'));
const verifyHash = hmac.digest();
const nonce = crypto.randomBytes(16).toString('base64');
storage.setField(id, 'nonce', nonce);
if (!verifyHash.equals(Buffer.from(auth, 'base64'))) {
res.set('WWW-Authenticate', `send-v1 ${nonce}`);
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
return res.sendStatus(401);
}
const nonce = crypto.randomBytes(16).toString('base64');
storage.setField(id, 'nonce', nonce);
res.set('WWW-Authenticate', `send-v1 ${nonce}`);
} catch (e) {
res.sendStatus(404);
}

View File

@@ -12,9 +12,12 @@ module.exports = function(req, res) {
if (!metadata || !auth) {
return res.sendStatus(400);
}
const owner = crypto.randomBytes(10).toString('hex');
const meta = {
delete: crypto.randomBytes(10).toString('hex'),
dlimit: 1,
dl: 0,
owner,
delete: owner, // delete is deprecated
metadata,
pwd: 0,
auth: auth.split(' ')[1],
@@ -30,7 +33,7 @@ module.exports = function(req, res) {
res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`);
res.json({
url,
delete: meta.delete,
owner: meta.owner,
id: newId
});
} catch (e) {

View File

@@ -134,7 +134,7 @@ function localSet(newId, file, meta) {
redis_client.hmset(newId, meta);
redis_client.expire(newId, config.expire_seconds);
log.info('localSet:', 'Upload Finished of ' + newId);
resolve(meta.delete);
resolve(meta.owner);
});
fstream.on('error', err => {
@@ -145,10 +145,10 @@ function localSet(newId, file, meta) {
});
}
function localDelete(id, delete_token) {
function localDelete(id, ownerToken) {
return new Promise((resolve, reject) => {
redis_client.hget(id, 'delete', (err, reply) => {
if (!reply || delete_token !== reply) {
if (!reply || ownerToken !== reply) {
reject();
} else {
redis_client.del(id);
@@ -230,10 +230,10 @@ function awsSet(newId, file, meta) {
);
}
function awsDelete(id, delete_token) {
function awsDelete(id, ownerToken) {
return new Promise((resolve, reject) => {
redis_client.hget(id, 'delete', (err, reply) => {
if (!reply || delete_token !== reply) {
if (!reply || ownerToken !== reply) {
reject();
} else {
const params = {

View File

@@ -4,6 +4,12 @@ const CopyPlugin = require('copy-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const IS_DEV = process.env.NODE_ENV === 'development';
const regularJSOptions = {
babelrc: false,
presets: [['env', { modules: false }], 'stage-2'],
plugins: ['yo-yoify']
};
module.exports = {
entry: {
vendor: ['babel-polyfill', 'fluent'],
@@ -31,6 +37,16 @@ module.exports = {
}
]
},
{
include: require.resolve('./app/templates/header'),
use: [
{
loader: 'babel-loader',
options: regularJSOptions
},
'./build/version_loader'
]
},
{
include: [path.dirname(require.resolve('fluent'))],
use: [
@@ -51,13 +67,11 @@ module.exports = {
include: [
path.resolve(__dirname, 'app'),
path.resolve(__dirname, 'common'),
path.resolve(__dirname, 'node_modules/testpilot-ga/src')
path.resolve(__dirname, 'node_modules/testpilot-ga/src'),
path.resolve(__dirname, 'node_modules/fluent-intl-polyfill'),
path.resolve(__dirname, 'node_modules/intl-pluralrules')
],
options: {
babelrc: false,
presets: [['env', { modules: false }], 'stage-2'],
plugins: ['yo-yoify']
}
options: regularJSOptions
},
{
include: [path.resolve(__dirname, 'node_modules')],