Commit Graph

16 Commits

Author SHA1 Message Date
Christian Bundy 8ccfb1a1ec Fix allow-host preset not working correctly
Problem: The preset for allow-host is coming from "host".

Solution: Make the preset for allow-host come from "allow-host".
2020-04-14 10:53:23 -07:00
Christian Bundy ebf6e17389 Add --allow-host CLI flag for for proxy use-case
Problem: When proxying Oasis, the CSRF + DNS rebind security precautions
will respond with HTTP 400 if you use a hostname that Oasis doesn't
know about. For example, if Oasis is listening on `localhost` and you
use Caddy/Nginx/etc to proxy that to `oasis.example.com`, then Oasis
will see GET requests as DNS rebind attacks and POST requests as CSRF
attacks.

Solution: Add `--allow-host` command-line flag so that you can
`--allow-host oasis.example.com` and ensure that the host is allowed by
the security measures.
2020-04-11 08:36:29 -07:00
Christian Bundy fb23d25217 Add more type definitions to reduce implicit any
Problem: We still have heaps of implicit 'any' types that our linters
can't make sense of.

Solution: Keep on adding type documentation! Slowly but surely I'm
hoping we can reduce the amount of untyped JavaScript in the repo.
2020-03-27 08:21:40 -07:00
Christian Bundy a4ccae8833 Fix theme using capitalization
Problem: Capitalization in "sulphurPool" was causing a file not found.

Solution: Replace "sulphurPool" with "sulphurpool".
2020-03-24 14:55:50 -07:00
Christian Bundy 11c413d447 Merge branch 'master' of github.com:fraction/oasis into npm-update-march-23 2020-03-24 12:09:39 -07:00
Nick Wynja a4b00696ab Load theme using existing config mechanisms
This allow someone to pass in the theme as a command line arg or set the
theme in defaults.json, while still allowing someone to set the theme on
a per-browser basis as a cookie.
2020-03-24 14:11:27 -04:00
Christian Bundy 32465e5983 Update npm dependencies
Problem: Our dependencies are falling behind and it'd be nice to have
them up-to-date. The only big update it that Common-Good upgraded to the
latest version of Prettier.

Solution: Update them!
2020-03-23 18:59:53 -07:00
Daan Wynen 7ec64e04bf Add config documentation (addresses #254). 2020-02-23 12:09:51 +01:00
Daan Wynen 35c42f6b95 Read settings from ~/.config/oasis/config.json
This should give pretty much expected behaviour. Each config value
can be set by three sources:

1. By command-line argument. If it is not given, then
2. By config file. Or, lastly
3. By default value in the source code.

I can't test that the config file is searched and read from the right
place on windows or macOS, but on linux it works.
2020-02-22 10:32:50 +01:00
Joshua Kelly f7ab71e891 Changes /meta to /settings
Problem: meta was renamed in the UI to settings, but the URLs say meta

Solution: Rename them to /settings/*
2020-02-10 18:07:55 -08:00
Christian Bundy 0236358dc8 Add --public option for public viewers
Problem: It's hard to show off Oasis or take screenshots without
respecting the `publicWebHosting` convention. While `publicWebHosting`
lacks a formal specification and I'm a bit confused about what its
boundaries are, it sounds like some of our friends would like to avoid
us publishing any of their content on the public web if we can avoid it.

Solution: Add --public option that turns Oasis into a public web viewer.
This makes it **slightly inconvenient** to see these public posts, but
should absolutely not be mistaken for a privacy guarantee. Only HTTP GET
endpoints are allowed, so random people can't publish or change
settings. The name, avatar, description, content warning, and message
contents are replaced with "Redacted", but again, this is all public
information that we can never provide real privacy for.

Resolves https://github.com/fraction/oasis/issues/48
2020-02-08 10:46:57 -08:00
Christian Bundy 64a2ed135c Update CLI with more info on --offline
Problem: The --offline documentation doesn't mention that networking
status can be changed, which may give the false understanding that the
networking is permanently offline when you use that flag.

Solution: Add a note that mentions that the 'meta' page lets you change
your networking status, and that --offline is only applicable to the
starting state of Oasis.
2020-01-27 11:58:32 -08:00
Christian Bundy b34b04c2c2 Experiment with common-good module 2020-01-21 16:22:19 -08:00
Christian Bundy 2a6bcc993f Merge branch 'master' of github.com:fraction/oasis into mediator 2020-01-09 09:26:17 -08:00
Christian Bundy ca29986131 Move shebang from cli.js to index.js 2020-01-08 12:04:43 -08:00
Christian Bundy 5f528588b1 Change src directory to use mediator pattern 2020-01-08 08:37:52 -08:00