Compare commits

...

81 Commits

Author SHA1 Message Date
timvisee
0ebea72b3e Bump version to 3.4.18 2022-03-28 22:03:52 +02:00
timvisee
9cac202892 Update dependencies 2022-03-28 21:45:05 +02:00
Tim Visée
b41c8087f9 Merge branch 'improve-dockerfile' into 'master'
Docker: Set app user gid/uid to 1000

See merge request timvisee/send!22
2022-03-28 19:41:20 +00:00
Lounès Ksouri
9fcc8e36b0 set app user gid/uid to 1000 2022-03-26 15:08:24 +00:00
timvisee
905ca545c7 Update dependencies 2022-03-21 16:13:07 +01:00
timvisee
742b5de7e1 Update dependencies 2022-03-07 14:39:38 +01:00
timvisee
5d7162c4a3 Bump version to 3.4.17 2022-03-04 16:54:02 +01:00
Tim Visée
4c5d8e3bd3 Merge branch 'fix-utf8' into 'master'
Change archive bit flags to specify use of UTF-8 filenames

See merge request timvisee/send!21
2022-03-04 15:52:16 +00:00
timvisee
709997ba72 Fix garbled filenames on Windows with ZIP files due to missing UTF-8 flag
See https://gitlab.com/timvisee/send/-/issues/10
2022-03-04 16:48:58 +01:00
timvisee
b880516edf Change archive bit flags to specify use of UTF-8 filenames
Related to https://gitlab.com/timvisee/send/-/issues/10#note_549739569

Suggested in https://github.com/mozilla/send/issues/1432#issue-545383226
2022-03-04 16:46:12 +01:00
timvisee
fa716a7da6 Merge branch 'dependabot/npm_and_yarn/url-parse-1.5.10' into master
See https://github.com/timvisee/send/pull/74
2022-02-28 12:08:53 +01:00
dependabot[bot]
40fc5c35ca Bump url-parse from 1.5.7 to 1.5.10
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 04:39:37 +00:00
timvisee
8d72c81150 Merge branch 'dependabot/npm_and_yarn/url-parse-1.5.7' into master
See https://github.com/timvisee/send/pull/73
2022-02-20 20:29:42 +01:00
dependabot[bot]
383b84ef1f Bump url-parse from 1.5.3 to 1.5.7
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-19 06:33:26 +00:00
timvisee
7cba51b729 Tweak FAQ to remove old FXA notice 2022-02-18 16:53:55 +01:00
timvisee
7d024a9998 Merge branch 'dependabot/npm_and_yarn/tar-4.4.19' into master
See https://github.com/timvisee/send/pull/70
2022-02-14 13:40:58 +01:00
timvisee
eabff183ec Merge branch 'master' into dependabot/npm_and_yarn/tar-4.4.19
See https://github.com/timvisee/send/pull/70
2022-02-14 13:40:49 +01:00
timvisee
d04829cbf2 Merge branch 'dependabot/npm_and_yarn/follow-redirects-1.14.8' into master
See https://github.com/timvisee/send/pull/69
2022-02-14 12:35:42 +01:00
dependabot[bot]
af52b96ab4 Bump follow-redirects from 1.14.7 to 1.14.8
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 11:30:46 +00:00
dependabot[bot]
ec26a8e38f Bump tar from 4.4.13 to 4.4.19
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 11:30:35 +00:00
timvisee
41f5615acc Merge branch 'dependabot/npm_and_yarn/ajv-6.12.6' into master
See https://github.com/timvisee/send/pull/68
2022-02-14 12:27:30 +01:00
dependabot[bot]
756d1b1d14 Bump ajv from 6.12.2 to 6.12.6
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 20:05:07 +00:00
timvisee
a37a0c8678 Update dependencies 2022-01-24 17:20:29 +01:00
timvisee
8c50da564f Update configstore 2022-01-24 17:16:14 +01:00
timvisee
214f723232 Merge branch 'dependabot/npm_and_yarn/nanoid-3.2.0' into master
See https://github.com/timvisee/send/pull/64
2022-01-24 17:14:41 +01:00
dependabot[bot]
f2a6af409e Bump nanoid from 3.1.16 to 3.2.0
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.16 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.16...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-22 01:16:00 +00:00
timvisee
b346e3e3ae Bump version to 3.4.16 2022-01-17 13:09:45 +01:00
timvisee
aea428372d Update dependencies 2022-01-17 13:09:19 +01:00
timvisee
ea8efb9d93 Merge branch 'dependabot/npm_and_yarn/follow-redirects-1.14.7' into master
See https://github.com/timvisee/send/pull/63
2022-01-17 13:05:15 +01:00
dependabot[bot]
2b7164f589 Bump follow-redirects from 1.14.5 to 1.14.7
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-14 22:50:28 +00:00
timvisee
08399059e9 Bump version to 3.4.15 2021-12-19 23:07:24 +01:00
timvisee
aea40fa11b Update dependencies 2021-12-19 23:04:26 +01:00
timvisee
e51c753c0d Merge branch 'goxlur-patch-1' into master
See https://github.com/timvisee/send/pull/60
2021-12-19 23:00:14 +01:00
goxlur
6520d71faa Fix page scroll overflow 2021-12-19 00:36:47 +01:00
Tim Visée
97b0b10863 Merge branch 'node-16' into 'master'
Bump node to latest LTS v16.13

See merge request timvisee/send!20
2021-12-01 18:00:21 +00:00
timvisee
50e76e0895 Do not use --openssl-legacy-provider 2021-12-01 18:23:25 +01:00
timvisee
610e036e26 Bump node to latest LTS v16.13 2021-12-01 18:20:43 +01:00
timvisee
e695a8b481 Update browserlist 2021-12-01 18:14:01 +01:00
timvisee
d33ddf643b Update dependencies 2021-12-01 18:13:10 +01:00
timvisee
512bd32368 Use 64x64 PNG icon in README 2021-11-24 14:42:29 +01:00
timvisee
3c42de0efd Fix Docker artifact build on CI 2021-11-01 12:44:49 +01:00
timvisee
b7582230cf Update dependencies 2021-10-24 15:10:28 +02:00
timvisee
592ff3fb4a Bump version to 3.4.14 2021-10-06 18:11:54 +02:00
timvisee
927203cb96 Add double-ended-queue dependency
See https://gitlab.com/timvisee/send/-/issues/23
2021-10-06 18:10:46 +02:00
timvisee
48237807fa Update dependencies 2021-10-06 18:08:47 +02:00
timvisee
38a4552d52 List Thunderbird FileLink provider extension as client in README
Fixes https://github.com/timvisee/send/issues/15
2021-08-30 15:28:29 +02:00
timvisee
9d2d81e063 Merge branch 'dependabot/npm_and_yarn/url-parse-1.5.3' into master
See https://github.com/timvisee/send/pull/53
2021-08-13 14:42:36 +02:00
dependabot[bot]
81d6c90c4e Bump url-parse from 1.5.1 to 1.5.3
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 11:05:08 +00:00
timvisee
2bdaa0c4bd Merge branch 'dependabot/npm_and_yarn/path-parse-1.0.7' into master
See https://github.com/timvisee/send/pull/52
2021-08-13 13:02:29 +02:00
dependabot[bot]
00d3bebc27 Bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-12 22:09:37 +00:00
timvisee
ea384ff5d3 Update dependencies 2021-08-08 20:36:26 +02:00
timvisee
062c439ec0 Bump version to 3.4.13 2021-07-08 23:13:15 +02:00
Tim Visée
54e528980b Merge branch 'master' into 'master'
fix: remove iOS saveFile workaround #20

See merge request timvisee/send!19
2021-07-08 21:12:06 +00:00
Paul Zeinlinger
b9292abefe fix: remove iOS saveFile workaround #20 2021-07-08 23:05:39 +02:00
timvisee
1520942ac9 Fix UI error after upload when share link is too long
The QR-code generation logic had a character limit. This broke the
upload page when the share URL is too long. This has now been fixed to
support an arbitrary number of characters.

Fixes https://gitlab.com/timvisee/send/-/issues/19
2021-07-08 21:21:35 +02:00
timvisee
0e17cd567c Update qrcode snippet 2021-07-08 21:20:27 +02:00
timvisee
7b21b199c2 Update dependencies 2021-07-08 21:12:17 +02:00
timvisee
6214b07a30 Merge branch 'dependabot/npm_and_yarn/redis-3.1.1' into master
See https://github.com/timvisee/send/pull/20
2021-06-28 17:28:31 +02:00
dependabot[bot]
941d87976b Bump redis from 2.8.0 to 3.1.1
Bumps [redis](https://github.com/NodeRedis/node-redis) from 2.8.0 to 3.1.1.
- [Release notes](https://github.com/NodeRedis/node-redis/releases)
- [Changelog](https://github.com/NodeRedis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NodeRedis/node-redis/compare/v.2.8.0...v3.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 15:28:06 +00:00
timvisee
8db3fed6fb Merge branch 'dependabot/npm_and_yarn/color-string-1.5.5' into master 2021-06-28 17:24:05 +02:00
dependabot[bot]
78ca1f06e0 Bump color-string from 1.5.3 to 1.5.5
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 15:22:18 +00:00
timvisee
9fdc079878 Remove annoying husky post merge and checkout hooks 2021-06-28 17:19:30 +02:00
timvisee
f08d078236 Update dependencies 2021-06-23 21:02:46 +02:00
timvisee
46ae4a220b Merge branch 'dependabot/npm_and_yarn/trim-newlines-3.0.1' into master
See https://github.com/timvisee/send/pull/43
2021-06-09 13:28:26 +02:00
dependabot[bot]
d0932c26ea Bump trim-newlines from 3.0.0 to 3.0.1
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
- [Commits](https://github.com/sindresorhus/trim-newlines/commits)

---
updated-dependencies:
- dependency-name: trim-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 11:26:31 +00:00
timvisee
798c399a38 Update dependencies 2021-06-09 12:48:02 +02:00
timvisee
825e3942a2 Bump version to v3.4.12 2021-06-04 14:08:25 +02:00
timvisee
755459f57e Update dependencies 2021-06-04 14:07:19 +02:00
Tim Visée
42f5ca9701 Merge branch 'default-download-count' into 'master'
Add DEFAULT_DOWNLOADS variable to set default download count

See merge request timvisee/send!18
2021-06-04 12:06:05 +00:00
timvisee
1a923d21b5 Add DEFAULT_DOWNLOADS variable to set default download count
Fixes https://github.com/timvisee/send/issues/39
2021-06-04 14:03:58 +02:00
timvisee
3bd9f00c25 Merge branch 'dependabot/npm_and_yarn/ws-6.2.2'
See https://github.com/timvisee/send/pull/42
2021-06-04 13:50:02 +02:00
dependabot[bot]
fa1c64369f Bump ws from 6.2.1 to 6.2.2
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-04 11:47:46 +00:00
timvisee
9280f47afc Update dependencies 2021-06-04 13:46:24 +02:00
timvisee
3707b90d09 Update dependencies 2021-05-30 12:41:42 +02:00
timvisee
21392f1157 Merge branch 'dependabot/npm_and_yarn/dns-packet-1.3.4' into master
See https://github.com/timvisee/send/pull/37
2021-05-30 12:40:45 +02:00
dependabot[bot]
680d3ed948 Bump dns-packet from 1.3.1 to 1.3.4
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-29 01:54:35 +00:00
timvisee
dee1e84e58 Mention Docker page in deployment section 2021-05-19 16:49:13 +02:00
timvisee
214191e743 Replace links from mozilla/send to timvisee/send 2021-05-19 16:09:01 +02:00
timvisee
84da34169d Create static robots.txt file, remove dynamic route
Fixes https://gitlab.com/timvisee/send/-/issues/17
2021-05-19 16:00:58 +02:00
Tim Visée
93e1d2f41a Merge branch 'deploy' into 'master'
Fix chmod command

See merge request timvisee/send!17
2021-05-19 12:34:35 +00:00
David Dumas
43e1845d28 Fix chmod command 2021-05-19 12:34:35 +00:00
23 changed files with 3312 additions and 1997 deletions

View File

@@ -4,41 +4,57 @@
# License https://gitlab.com/timvisee/send/blob/master/LICENSE # License https://gitlab.com/timvisee/send/blob/master/LICENSE
## ##
# Build project # Build project
FROM node:current-alpine AS builder FROM node:16.13-alpine3.13 AS builder
RUN set -x \
# Change node uid/gid
&& apk --no-cache add shadow \
&& groupmod -g 1001 node \
&& usermod -u 1001 -g 1001 node
RUN set -x \ RUN set -x \
# Add user # Add user
&& addgroup --gid 10001 app \ && addgroup --gid 1000 app \
&& adduser --disabled-password \ && adduser --disabled-password \
--gecos '' \ --gecos '' \
--ingroup app \ --ingroup app \
--home /app \ --home /app \
--uid 10001 \ --uid 1000 \
app app
COPY --chown=app:app . /app COPY --chown=app:app . /app
USER app USER app
WORKDIR /app WORKDIR /app
RUN set -x \ RUN set -x \
# Build # Build
&& PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm ci \ && PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm ci \
&& npm run build && npm run build
# Main image # Main image
FROM node:current-alpine FROM node:16.13-alpine3.13
RUN set -x \
# Change node uid/gid
&& apk --no-cache add shadow \
&& groupmod -g 1001 node \
&& usermod -u 1001 -g 1001 node
RUN set -x \ RUN set -x \
# Add user # Add user
&& addgroup --gid 10001 app \ && addgroup --gid 1000 app \
&& adduser --disabled-password \ && adduser --disabled-password \
--gecos '' \ --gecos '' \
--ingroup app \ --ingroup app \
--home /app \ --home /app \
--uid 10001 \ --uid 1000 \
app app
USER app USER app
WORKDIR /app WORKDIR /app
COPY --chown=app:app package*.json ./ COPY --chown=app:app package*.json ./
COPY --chown=app:app app app COPY --chown=app:app app app
COPY --chown=app:app common common COPY --chown=app:app common common

View File

@@ -1,4 +1,4 @@
# [![Send](./assets/icon.svg)](https://gitlab.com/timvisee/send/) Send # [![Send](./assets/icon-64x64.png)](https://gitlab.com/timvisee/send/) Send
[![Build status on GitLab CI][gitlab-ci-master-badge]][gitlab-ci-link] [![Build status on GitLab CI][gitlab-ci-master-badge]][gitlab-ci-link]
[![Latest release][release-badge]][release-link] [![Latest release][release-badge]][release-link]
@@ -81,7 +81,7 @@ A file sharing experiment which allows you to send encrypted files to other user
## Requirements ## Requirements
- [Node.js 15.x](https://nodejs.org/) - [Node.js 16.x](https://nodejs.org/)
- [Redis server](https://redis.io/) (optional for development) - [Redis server](https://redis.io/) (optional for development)
- [AWS S3](https://aws.amazon.com/s3/) or compatible service (optional) - [AWS S3](https://aws.amazon.com/s3/) or compatible service (optional)
@@ -121,7 +121,7 @@ The server is configured with environment variables. See [server/config.js](serv
## Localization ## Localization
see [docs/localization.md](docs/localization.md) See: [docs/localization.md](docs/localization.md)
--- ---
@@ -139,9 +139,11 @@ Find a list of public instances here: https://github.com/timvisee/send-instances
## Deployment ## Deployment
See also [docs/deployment.md](docs/deployment.md) See: [docs/deployment.md](docs/deployment.md)
AWS example using Ubuntu Server `20.04` [docs/AWS.md](docs/AWS.md) Docker quickstart: [docs/docker.md](docs/docker.md)
AWS example using Ubuntu Server `20.04`: [docs/AWS.md](docs/AWS.md)
--- ---
@@ -150,6 +152,7 @@ AWS example using Ubuntu Server `20.04` [docs/AWS.md](docs/AWS.md)
- Web: _this repository_ - Web: _this repository_
- Command-line: [`ffsend`](https://github.com/timvisee/ffsend) - Command-line: [`ffsend`](https://github.com/timvisee/ffsend)
- Android: _see [Android](#android) section_ - Android: _see [Android](#android) section_
- Thunderbird: [FileLink provider for Send](https://addons.thunderbird.net/en-US/thunderbird/addon/filelink-provider-for-send/)
#### Android #### Android

View File

@@ -77,7 +77,11 @@ function body(main) {
state.capabilities = { state.capabilities = {
account: true account: true
}; //TODO }; //TODO
state.archive = new Archive([], DEFAULTS.EXPIRE_SECONDS); state.archive = new Archive(
[],
DEFAULTS.EXPIRE_SECONDS,
DEFAULTS.DOWNLOADS
);
state.storage = storage; state.storage = storage;
state.user = new User(storage, LIMITS); state.user = new User(storage, LIMITS);
state.sentry = Sentry; state.sentry = Sentry;

View File

@@ -14,11 +14,11 @@ function isDupe(newFile, array) {
} }
export default class Archive { export default class Archive {
constructor(files = [], defaultTimeLimit = 86400) { constructor(files = [], defaultTimeLimit = 86400, defaultDownloadLimit = 1) {
this.files = Array.from(files); this.files = Array.from(files);
this.defaultTimeLimit = defaultTimeLimit; this.defaultTimeLimit = defaultTimeLimit;
this.timeLimit = defaultTimeLimit; this.timeLimit = defaultTimeLimit;
this.dlimit = 1; this.dlimit = defaultDownloadLimit;
this.password = null; this.password = null;
} }

View File

@@ -224,24 +224,6 @@ async function saveFile(file) {
if (navigator.msSaveBlob) { if (navigator.msSaveBlob) {
navigator.msSaveBlob(blob, file.name); navigator.msSaveBlob(blob, file.name);
return resolve(); return resolve();
} else if (/iPhone|fxios/i.test(navigator.userAgent)) {
// This method is much slower but createObjectURL
// is buggy on iOS
const reader = new FileReader();
reader.addEventListener('loadend', function() {
if (reader.error) {
return reject(reader.error);
}
if (reader.result) {
const a = document.createElement('a');
a.href = reader.result;
a.download = file.name;
document.body.appendChild(a);
a.click();
}
resolve();
});
reader.readAsDataURL(blob);
} else { } else {
const downloadUrl = URL.createObjectURL(blob); const downloadUrl = URL.createObjectURL(blob);
const a = document.createElement('a'); const a = document.createElement('a');

View File

@@ -175,7 +175,6 @@ footer li a:hover {
position: relative; position: relative;
max-width: 64rem; max-width: 64rem;
width: 100%; width: 100%;
height: 100%;
} }
.main > section { .main > section {
@@ -271,7 +270,6 @@ select {
@apply m-auto; @apply m-auto;
@apply py-8; @apply py-8;
min-height: 42rem;
max-height: 42rem; max-height: 42rem;
width: calc(100% - 3rem); width: calc(100% - 3rem);
} }

View File

@@ -52,7 +52,7 @@ if (process.env.NODE_ENV === 'production') {
DEFAULTS, DEFAULTS,
WEB_UI, WEB_UI,
PREFS, PREFS,
archive: new Archive([], DEFAULTS.EXPIRE_SECONDS), archive: new Archive([], DEFAULTS.EXPIRE_SECONDS, DEFAULTS.DOWNLOADS),
capabilities, capabilities,
translate, translate,
storage, storage,

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,6 @@ module.exports = function(app = choo({ hash: true })) {
app.route('/unsupported/:reason', body(require('./ui/unsupported'))); app.route('/unsupported/:reason', body(require('./ui/unsupported')));
app.route('/error', body(require('./ui/error'))); app.route('/error', body(require('./ui/error')));
app.route('/blank', body(require('./ui/blank'))); app.route('/blank', body(require('./ui/blank')));
app.route('/robots.txt', function() {return 'User-agent: * Disallow: /'});
app.route('/oauth', function(state, emit) { app.route('/oauth', function(state, emit) {
emit('authenticate', state.query.code, state.query.state); emit('authenticate', state.query.code, state.query.state);
}); });

View File

@@ -2,7 +2,7 @@ const raw = require('choo/html/raw');
const qrcode = require('../qrcode'); const qrcode = require('../qrcode');
module.exports = function(url) { module.exports = function(url) {
const gen = qrcode(5, 'L'); const gen = qrcode(0, 'L');
gen.addData(url); gen.addData(url);
gen.make(); gen.make();
const qr = gen.createSvgTag({ scalable: true }); const qr = gen.createSvgTag({ scalable: true });

View File

@@ -11,7 +11,7 @@ module.exports = function(state, emit) {
why = html` why = html`
<a <a
class="text-blue" class="text-blue"
href="https://github.com/mozilla/send/blob/master/docs/faq.md#why-is-my-browser-not-supported" href="https://github.com/timvisee/send/blob/master/docs/faq.md#why-is-my-browser-not-supported"
> >
${state.translate('notSupportedLink')} ${state.translate('notSupportedLink')}
</a> </a>

View File

@@ -29,7 +29,7 @@ class File {
const v = new DataView(h); const v = new DataView(h);
v.setUint32(0, 0x04034b50, true); // sig v.setUint32(0, 0x04034b50, true); // sig
v.setUint16(4, 20, true); // version v.setUint16(4, 20, true); // version
v.setUint16(6, 8, true); // bit flags (8 = use data descriptor) v.setUint16(6, 0x808, true); // bit flags (use data descriptor(8) + utf8-encoded(8 << 8))
v.setUint16(8, 0, true); // compression v.setUint16(8, 0, true); // compression
v.setUint16(10, this.dateTime.time, true); // modified time v.setUint16(10, this.dateTime.time, true); // modified time
v.setUint16(12, this.dateTime.date, true); // modified date v.setUint16(12, this.dateTime.date, true); // modified date
@@ -60,7 +60,7 @@ class File {
v.setUint32(0, 0x02014b50, true); // sig v.setUint32(0, 0x02014b50, true); // sig
v.setUint16(4, 20, true); // version made v.setUint16(4, 20, true); // version made
v.setUint16(6, 20, true); // version required v.setUint16(6, 20, true); // version required
v.setUint16(8, 8, true); // bit flags (8 = use data descriptor) v.setUint16(8, 0x808, true); // bit flags (use data descriptor(8) + utf8-encoded(8 << 8))
v.setUint16(10, 0, true); // compression v.setUint16(10, 0, true); // compression
v.setUint16(12, this.dateTime.time, true); // modified time v.setUint16(12, this.dateTime.time, true); // modified time
v.setUint16(14, this.dateTime.date, true); // modified date v.setUint16(14, this.dateTime.date, true); // modified date

BIN
assets/icon-64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -195,7 +195,7 @@ Lower files and folders permissions to user and group `www-data`:
``` ```
sudo find /var/www/send -type d -exec chmod 750 {} \; sudo find /var/www/send -type d -exec chmod 750 {} \;
sudo find /var/www/send -type f -exec chmod 640 {} \; sudo find /var/www/send -type f -exec chmod 640 {} \;
sudo chmod 750 /var/www/send/node_modules/.bin/* sudo find -L /var/www/send/node_modules/.bin/ -exec chmod 750 {} \;
``` ```
### Systemd ### Systemd

View File

@@ -49,6 +49,8 @@ Configure the limits for uploads and downloads. Long expiration times are risky
| `MAX_DOWNLOADS` | Maximum number of downloads (defaults to `100`) | `MAX_DOWNLOADS` | Maximum number of downloads (defaults to `100`)
| `DOWNLOAD_COUNTS` | Download limit options to show in UI dropdown, e.g. `10,1,2,5,10,15,25,50,100,1000` | `DOWNLOAD_COUNTS` | Download limit options to show in UI dropdown, e.g. `10,1,2,5,10,15,25,50,100,1000`
| `EXPIRE_TIMES_SECONDS` | Expire time options to show in UI dropdown, e.g. `3600,86400,604800,2592000,31536000` | `EXPIRE_TIMES_SECONDS` | Expire time options to show in UI dropdown, e.g. `3600,86400,604800,2592000,31536000`
| `DEFAULT_DOWNLOADS` | Default download limit in UI (defaults to `1`)
| `DEFAULT_EXPIRE_SECONDS` | Default expire time in UI (defaults to `86400`)
*Note: more options can be found here: https://github.com/timvisee/send/blob/master/server/config.js* *Note: more options can be found here: https://github.com/timvisee/send/blob/master/server/config.js*

View File

@@ -1,12 +1,12 @@
## How big of a file can I transfer with Send? ## How big of a file can I transfer with Send?
There is a 2.5GB file size limit built in to Send(1GB for non-signed in users), however, in practice you may There is a 2GB file size limit built in to Send, but this may be changed by the
be unable to send files that large. Send encrypts and decrypts the files in hoster. Send encrypts and decrypts the files in the browser which is great for
the browser which is great for security but will tax your system resources. In security but will tax your system resources. In particular you can expect to
particular you can expect to see your memory usage go up by at least the size see your memory usage go up by at least the size of the file when the transfer
of the file when the transfer is processing. You can see [the results of some is processing. You can see [the results of some
testing](https://github.com/mozilla/send/issues/170#issuecomment-314107793). testing](https://github.com/mozilla/send/issues/170#issuecomment-314107793). For
For the most reliable operation on common computers, its probably best to stay the most reliable operation on common computers, its probably best to stay
under a few hundred megabytes. under a few hundred megabytes.
## Why is my browser not supported? ## Why is my browser not supported?
@@ -23,10 +23,10 @@ Send uses JavaScript to:
- Encrypt and decrypt files locally on the client instead of the server. - Encrypt and decrypt files locally on the client instead of the server.
- Render the user interface. - Render the user interface.
- Manage translations on the website into [various different languages](https://github.com/mozilla/send#localization). - Manage translations on the website into [various different languages](https://github.com/timvisee/send#localization).
- Collect data to help us improve Send in accordance with our [Terms & Privacy](https://send.firefox.com/legal). - Collect data to help us improve Send in accordance with our [Terms & Privacy](https://send.firefox.com/legal).
Since Send is an open source project, you can see all of the cool ways we use JavaScript by [examining our code](https://github.com/mozilla/send/). Since Send is an open source project, you can see all of the cool ways we use JavaScript by [examining our code](https://github.com/timvisee/send/).
## How long are files available for? ## How long are files available for?

3836
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
"name": "send", "name": "send",
"description": "File Sharing Experiment", "description": "File Sharing Experiment",
"version": "3.4.11", "version": "3.4.18",
"author": "Mozilla (https://mozilla.org)", "author": "Mozilla (https://mozilla.org)",
"contributors": [ "contributors": [
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)" "Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
@@ -37,9 +37,7 @@
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"pre-push": "npm test", "pre-push": "npm test"
"post-merge": "npm install",
"post-checkout": "scripts/sync-npm-dependencies.sh"
} }
}, },
"lint-staged": { "lint-staged": {
@@ -61,24 +59,24 @@
"cache": true "cache": true
}, },
"engines": { "engines": {
"node": "^15.5.1" "node": "^16.13.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.14.3", "@babel/core": "^7.17.8",
"@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.14.2", "@babel/preset-env": "^7.16.11",
"@dannycoates/webcrypto-liner": "^0.1.37", "@dannycoates/webcrypto-liner": "^0.1.37",
"@fullhuman/postcss-purgecss": "^1.3.0", "@fullhuman/postcss-purgecss": "^1.3.0",
"@mattiasbuelens/web-streams-polyfill": "0.2.1", "@mattiasbuelens/web-streams-polyfill": "0.2.1",
"@sentry/browser": "^5.30.0", "@sentry/browser": "^5.30.0",
"asmcrypto.js": "^0.22.0", "asmcrypto.js": "^0.22.0",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.4",
"babel-plugin-istanbul": "^5.2.0", "babel-plugin-istanbul": "^5.2.0",
"base64-js": "^1.5.1", "base64-js": "^1.5.1",
"content-disposition": "^0.5.3", "content-disposition": "^0.5.4",
"copy-webpack-plugin": "^5.1.2", "copy-webpack-plugin": "^5.1.2",
"core-js": "^3.12.1", "core-js": "^3.21.1",
"crc": "^3.8.0", "crc": "^3.8.0",
"cross-env": "^6.0.3", "cross-env": "^6.0.3",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
@@ -98,7 +96,7 @@
"html-loader": "^0.5.5", "html-loader": "^0.5.5",
"http_ece": "^1.1.0", "http_ece": "^1.1.0",
"husky": "^3.0.9", "husky": "^3.0.9",
"intl-pluralrules": "^1.2.2", "intl-pluralrules": "^1.3.1",
"lint-staged": "^9.4.2", "lint-staged": "^9.4.2",
"mocha": "^6.2.2", "mocha": "^6.2.2",
"morgan": "^1.9.1", "morgan": "^1.9.1",
@@ -108,7 +106,7 @@
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"nyc": "^14.1.1", "nyc": "^14.1.1",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.7.0", "postcss-preset-env": "^6.7.1",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"proxyquire": "^2.1.3", "proxyquire": "^2.1.3",
"puppeteer": "^2.0.0", "puppeteer": "^2.0.0",
@@ -127,7 +125,7 @@
"webpack": "4.38.0", "webpack": "4.38.0",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-dev-middleware": "^3.7.3", "webpack-dev-middleware": "^3.7.3",
"webpack-dev-server": "^3.11.2", "webpack-dev-server": "^3.11.3",
"webpack-manifest-plugin": "^2.2.0", "webpack-manifest-plugin": "^2.2.0",
"webpack-unassert-loader": "^1.2.0" "webpack-unassert-loader": "^1.2.0"
}, },
@@ -135,23 +133,24 @@
"@dannycoates/express-ws": "^5.0.3", "@dannycoates/express-ws": "^5.0.3",
"@fluent/bundle": "^0.13.0", "@fluent/bundle": "^0.13.0",
"@fluent/langneg": "^0.3.0", "@fluent/langneg": "^0.3.0",
"@google-cloud/storage": "^5.8.5", "@google-cloud/storage": "^5.18.3",
"@sentry/node": "^5.30.0", "@sentry/node": "^5.30.0",
"aws-sdk": "^2.909.0", "aws-sdk": "^2.1102.0",
"body-parser": "^1.19.0", "body-parser": "^1.19.2",
"choo": "^7.0.0", "choo": "^7.0.0",
"cldr-core": "^35.1.0", "cldr-core": "^35.1.0",
"configstore": "github:dannycoates/configstore#master", "configstore": "github:dannycoates/configstore#master",
"convict": "^5.2.0", "convict": "^5.2.1",
"express": "^4.17.1", "double-ended-queue": "^2.1.0-0",
"express": "^4.17.3",
"helmet": "^3.23.3", "helmet": "^3.23.3",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.6",
"mozlog": "^2.2.0", "mozlog": "^2.2.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.7",
"redis": "^2.8.0", "redis": "^3.1.1",
"redis-mock": "^0.47.0", "redis-mock": "^0.47.0",
"selenium-standalone": "^6.23.0", "selenium-standalone": "^6.24.0",
"ua-parser-js": "^0.7.28" "ua-parser-js": "^0.7.31"
}, },
"availableLanguages": [ "availableLanguages": [
"en-US", "en-US",

View File

@@ -2,21 +2,16 @@
"name": "firefox-send", "name": "firefox-send",
"description": "File Sharing Experiment", "description": "File Sharing Experiment",
"repository": { "repository": {
"url": "https://github.com/mozilla/send/", "url": "https://github.com/send/send/",
"license": "MPL-2.0" "license": "MPL-2.0"
}, },
"participate": { "participate": {
"home": "https://github.com/mozilla/send/blob/master/README.md", "home": "https://github.com/send/send/blob/master/README.md",
"docs": "https://github.com/mozilla/send/blob/master/README.md" "docs": "https://github.com/send/send/blob/master/README.md"
}, },
"bugs": { "bugs": {
"list": "https://github.com/mozilla/send/issues", "list": "https://gitlab.com/send/send/issues",
"report": "https://github.com/mozilla/send/issues/new" "report": "https://gitlab.com/send/send/issues/new"
},
"urls": {
"prod": "https://send.firefox.com/",
"stage": "https://stage.send.nonprod.cloudops.mozgcp.net/",
"dev": "https://send2.dev.lcip.org/"
}, },
"keywords": [ "keywords": [
"JavaScript", "JavaScript",

2
public/robots.txt Normal file
View File

@@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@@ -15,6 +15,7 @@ module.exports = {
FOOTER_SOURCE_URL: config.footer_source_url FOOTER_SOURCE_URL: config.footer_source_url
}, },
DEFAULTS: { DEFAULTS: {
DOWNLOADS: config.default_downloads,
DOWNLOAD_COUNTS: config.download_counts, DOWNLOAD_COUNTS: config.download_counts,
EXPIRE_TIMES_SECONDS: config.expire_times_seconds, EXPIRE_TIMES_SECONDS: config.expire_times_seconds,
EXPIRE_SECONDS: config.default_expire_seconds EXPIRE_SECONDS: config.default_expire_seconds

View File

@@ -64,6 +64,11 @@ const conf = convict({
default: [1, 2, 3, 4, 5, 20, 50, 100], default: [1, 2, 3, 4, 5, 20, 50, 100],
env: 'DOWNLOAD_COUNTS' env: 'DOWNLOAD_COUNTS'
}, },
default_downloads: {
format: Number,
default: 1,
env: 'DEFAULT_DOWNLOADS'
},
max_downloads: { max_downloads: {
format: Number, format: Number,
default: 100, default: 100,

View File

@@ -26,7 +26,7 @@ module.exports = function(ws, req) {
const fileInfo = JSON.parse(message); const fileInfo = JSON.parse(message);
const timeLimit = fileInfo.timeLimit || config.default_expire_seconds; const timeLimit = fileInfo.timeLimit || config.default_expire_seconds;
const dlimit = fileInfo.dlimit || 1; const dlimit = fileInfo.dlimit || config.default_downloads;
const metadata = fileInfo.fileMetadata; const metadata = fileInfo.fileMetadata;
const auth = fileInfo.authorization; const auth = fileInfo.authorization;
const user = await fxa.verify(fileInfo.bearer); const user = await fxa.verify(fileInfo.bearer);