A glitchy but lovable microblogging server https://toot-lab.reclaim.technology/
Go to file
Eugen Rochko fac529975b Improve signature verification safeguards (#8959)
* Downcase signed_headers string before building the signed string

The HTTP Signatures draft does not mandate the “headers” field to be downcased,
but mandates the header field names to be downcased in the signed string, which
means that prior to this patch, Mastodon could fail to process signatures from
some compliant clients. It also means that it would not actually check the
Digest of non-compliant clients that wouldn't use a lowercased Digest field
name.

Thankfully, I don't know of any such client.

* Revert "Remove dead code (#8919)"

This reverts commit a00ce8c92c.

* Restore time window checking, change it to 12 hours

By checking the Date header, we can prevent replaying old vulnerable
signatures. The focus is to prevent replaying old vulnerable requests
from software that has been fixed in the meantime, so a somewhat long
window should be fine and accounts for timezone misconfiguration.

* Escape users' URLs when formatting them

Fixes possible HTML injection

* Escape all string interpolations in Formatter class

Slightly improve performance by reducing class allocations
from repeated Formatter#encode calls

* Fix code style issues
2018-10-12 07:00:41 +02:00
.circleci Merge branch 'master' into glitch-soc/merge-upstream 2018-08-18 18:04:49 +02:00
.github Adapt github issue template to glitch-soc 2018-08-19 16:56:42 +02:00
app Improve signature verification safeguards (#8959) 2018-10-12 07:00:41 +02:00
bin Upgrade Babel to version 7.0.0 (#5925) 2018-09-14 17:59:48 +02:00
config Merge branch 'master' into glitch-soc/merge-upstream 2018-10-09 21:08:26 +02:00
db Merge branch 'master' into glitch-soc/merge-upstream 2018-10-09 21:08:26 +02:00
dist Add nginx and systemd templates (#8770) 2018-09-24 16:46:05 +02:00
lib Merge branch 'master' into glitch-soc/merge-upstream 2018-10-08 13:51:33 +02:00
log Initial commit 2016-02-20 22:53:20 +01:00
nanobox [Nanobox] Tuning Update (#6660) 2018-03-06 21:59:35 +01:00
public Merge branch 'master' into glitch-soc/tentative-merge 2018-07-09 07:13:59 +02:00
spec Improve signature verification safeguards (#8959) 2018-10-12 07:00:41 +02:00
streaming Add conversations API (#8832) 2018-10-07 23:44:58 +02:00
vendor/assets Initial commit 2016-02-20 22:53:20 +01:00
.buildpacks Add ffmpeg buildpack for scalingo (#8500) 2018-08-29 01:21:23 +02:00
.codeclimate.yml fix RuboCop error (#7442) 2018-06-04 14:49:10 +02:00
.dockerignore Add .bundle to .dockerignore (#7895) 2018-06-26 20:33:29 +02:00
.editorconfig Add final newline to locale files (#2890) 2017-05-07 19:55:47 +02:00
.env.nanobox Rename S3_CLOUDFRONT_HOST to S3_ALIAS_HOST. (#8423) 2018-08-25 13:27:08 +02:00
.env.production.sample Merge branch 'master' into glitch-soc/merge-upstream 2018-08-26 14:23:24 +02:00
.env.test Add parallel test processors (#7215) 2018-04-21 21:36:22 +02:00
.env.vagrant update vagrant configs (#8706) 2018-09-16 14:49:15 -04:00
.eslintignore Dev Tooling fixes (eslint/editorconfig) (#1398) 2017-04-11 00:36:03 +02:00
.eslintrc.yml Merge remote-tracking branch 'origin/master' into gs-master 2018-06-02 16:15:36 -05:00
.foreman Replace sprockets/browserify with Webpack (#2617) 2017-05-03 02:04:16 +02:00
.gitattributes Add .gitattributes file to avoid unwanted CRLF (#3954) 2017-06-26 13:15:24 +02:00
.gitignore Ignore elasticsearch directory (#7070) 2018-04-08 16:57:16 +09:00
.gitmodules Rename themes -> flavours ? ? 2017-12-03 23:26:40 -08:00
.haml-lint.yml Added haml-lint and fix warnings (#2773) 2017-05-08 03:35:25 +02:00
.nanoignore Remove Storybook (#4397) 2017-07-27 22:30:27 +02:00
.nvmrc Upgrade Node.js to v8.x on nvmrc (#8023) 2018-07-15 12:29:17 +09:00
.postcssrc.yml Add object-fit polyfill for Edge (#4182) 2017-07-14 01:59:34 +02:00
.profile Add ffmpeg and dependent packages as well as LD_LIBRARY_PATHs (#3276) 2017-05-24 17:57:33 +02:00
.rspec Adding a Mention model, test stubs 2016-02-25 00:17:01 +01:00
.rubocop.yml Move more tasks to tootctl (#8675) 2018-09-14 17:42:22 +02:00
.ruby-version Update Ruby to version 2.4.4 (#6964) 2018-04-01 23:43:08 +02:00
.scss-lint.yml Enable CodeClimate SCSS Lint checks (#2886) 2017-05-07 20:47:31 +02:00
.slugignore Remove Storybook (#4397) 2017-07-27 22:30:27 +02:00
.yarnclean Reduce container size with clean yarn (#3506) 2017-09-30 22:05:24 +02:00
app.json Change logo URL for Heroku and Scalingo (#4476) 2017-08-01 05:59:11 +02:00
Aptfile Adjust Aptfile for Heroku-18 stack (#8588) 2018-09-09 02:10:58 +02:00
AUTHORS.md using mailto scheme in AUTHORS.md (#8663) 2018-09-10 02:01:03 +02:00
babel.config.js Upgrade Babel to version 7.0.0 (#5925) 2018-09-14 17:59:48 +02:00
boxfile.yml [Nanobox] Enable ElasticSearch support by default (#6977) 2018-03-31 13:17:25 +02:00
Capfile remove capistrano/faster_assets from Capfile (#2737) 2017-05-03 12:14:52 +02:00
CODE_OF_CONDUCT.md update code of conduct email address 2017-11-21 11:01:28 -05:00
config.ru Fix rubocop issues, introduce usage of frozen literal to improve performance 2016-11-15 16:56:29 +01:00
CONTRIBUTING.md Merge remote-tracking branch 'origin/master' into gs-master 2018-05-04 12:16:12 -05:00
docker-compose.yml Misc. typos (#8694) 2018-09-14 00:53:09 +02:00
Dockerfile Merge branch 'master' into glitch-soc/merge-upstream 2018-10-05 15:23:57 +02:00
Gemfile Merge commit 'ac7df62a0441b95ec04fd9111a9394795dd53ff2' into glitch-soc/merge-upstream 2018-10-11 14:12:36 +02:00
Gemfile.lock Merge commit 'ac7df62a0441b95ec04fd9111a9394795dd53ff2' into glitch-soc/merge-upstream 2018-10-11 14:12:36 +02:00
jest.config.js Removed glitch tests 2017-11-17 19:29:17 -08:00
LICENSE Fix #49 - License changed from GPL-2.0 to AGPL-3.0 2016-09-21 23:04:34 +02:00
package.json Revert Font Awesome 5 upgrade (#8810) 2018-09-28 02:11:14 +02:00
priv-config TOR federation (#7875) 2018-06-26 20:34:12 +02:00
Procfile More robust PuSH subscription refreshes (#2799) 2017-05-05 02:23:01 +02:00
Procfile.dev Fix Procfile on OS X (#6748) 2018-03-12 03:50:40 +01:00
Rakefile Initial commit 2016-02-20 22:53:20 +01:00
README.md Fix build status link in README.md 2018-09-28 21:18:04 +02:00
scalingo.json Add ffmpeg buildpack for scalingo (#8500) 2018-08-29 01:21:23 +02:00
stack-fix.c dockerfile: Give more stack space to /sbin/tini. 2018-01-11 04:09:16 -06:00
Vagrantfile Merge branch 'master' into glitch-soc/merge-upstream 2018-09-19 21:46:01 +02:00
yarn.lock Merge branch 'master' into glitch-soc/merge-upstream 2018-10-07 19:47:56 +02:00

Mastodon Glitch Edition

Now with automated deploys!

Build Status

So here's the deal: we all work on this code, and then it runs on dev.glitch.social and anyone who uses that does so absolutely at their own risk. can you dig it?