Commit graph

82 commits

Author SHA1 Message Date
Calvin Montgomery 1b7e7c74f5 Remove legacy counters 2021-08-19 20:36:04 -07:00
Calvin Montgomery da53decdd5 Fix #885 2021-03-22 22:53:03 -07:00
Calvin Montgomery 801e54afa2 Tweak urlencoded body size limit 2020-09-22 20:23:46 -07:00
Calvin Montgomery df82d2d4f1 Add registration captcha support 2020-09-22 20:11:34 -07:00
Calvin Montgomery a81e4d1d16 Fix copyright year in LICENSE 2019-02-02 15:56:43 -08:00
Calvin Montgomery aa2348656d Implement self-service account deletion 2018-12-07 20:35:00 -08:00
Calvin Montgomery 60a39890f0 Fix hostname comparison in /login 2018-11-11 16:11:51 -08:00
Calvin Montgomery 7b0427afa2 Remove code that was never finished and likely won't be used 2018-08-27 22:07:42 -07:00
Calvin Montgomery db2361aee9 Misc fixes for password reset
* Remove messaging about asking an administrator for help if no email
    is associated with the account (no longer correct or relevant)
  * Compare user-provided email with registered email case-insensitively
    (#755)
  * Replace antiquated hash generator with cryptographically secure
    random byte string generator
2018-07-11 19:21:32 -07:00
Calvin Montgomery 3413c3bdaa Reject guest names matching the reserved usernames regex 2018-06-03 22:01:40 -07:00
Calvin Montgomery 62417f7fb8
Add eslint (#741) 2018-04-07 15:30:30 -07:00
Calvin Montgomery 81e1947656 Clear template cache on /reload (#734) 2018-03-05 21:46:58 -08:00
Calvin Montgomery 49661a95ab Upgrade dependencies 2018-02-15 19:58:33 -08:00
Calvin Montgomery d706bf63b1 Fix ustream 2018-01-14 15:02:15 -08:00
Calvin Montgomery 875337d9a6 web/account: add referrer check 2017-11-05 16:17:37 -08:00
Calvin Montgomery 3cd8bfa8c7 Remove /sioconfig for real 2017-09-30 15:26:47 -07:00
Calvin Montgomery a2be65aead Reset prometheus summaries for more accurate percentiles per 5 minutes 2017-09-27 21:55:42 -07:00
Calvin Montgomery f975f7ef85 Update password reset to use new nodemailer impl 2017-09-26 21:22:15 -07:00
Calvin Montgomery bfc7cfc193 Remove old /useragreement 2017-09-19 22:07:00 -07:00
Calvin Montgomery c159fa8060 Remove old HTTPS redirect kludges 2017-09-19 20:49:33 -07:00
Calvin Montgomery 9e3426633d Support updating email via /account/data 2017-09-05 23:11:28 -07:00
Calvin Montgomery 5b6f86668a Refactoring 2017-09-05 22:47:29 -07:00
Calvin Montgomery 45d0e0b4c3 Guard unfinished web route with env variable 2017-09-03 17:22:57 -07:00
Calvin Montgomery b76869e2d2 Add some basic tests for implemented /account/data handlers 2017-09-01 21:20:07 -07:00
Calvin Montgomery 8b1b501bbd Start working on /account/data controller 2017-08-30 22:45:48 -07:00
Calvin Montgomery 3d50b8f52e Fix getSafeReferrer when referrer is null 2017-08-24 20:55:18 -07:00
Calvin Montgomery cc69b3c225 Revert "Remove legacy /sioconfig and user agreement link"
ACP has a dependency on `/sioconfig`.  Reverting until that can be
fixed.

This reverts commit a48cab81b9.
2017-08-23 23:15:30 -07:00
Calvin Montgomery cacde7f72d Fix unhandled rejections in webserver 2017-08-23 23:02:08 -07:00
Calvin Montgomery 7e6312f9d1 Remove ?dest= redirect logic for /login and use referrer instead 2017-08-22 17:25:18 -07:00
Calvin Montgomery a48cab81b9 Remove legacy /sioconfig and user agreement link
- `/sioconfig` has been deprecated for ages in favor of
    `/socketconfig/${channel}.json`
  - Each website administrator should be responsible for determining the
    appropriate terms of service for their website instead of CyTube
    providing a default one.
2017-08-21 23:19:19 -07:00
Calvin Montgomery 791a712a68 Move channel register/delete reload logic to message bus 2017-08-15 18:55:36 -07:00
Calvin Montgomery d16cfb7328 Add message bus for #677 2017-08-15 18:23:03 -07:00
Calvin Montgomery 99076412b6 Fix unhandled rejection 2017-08-14 20:31:45 -07:00
Calvin Montgomery d0c1e8cbd9 Change metric names to follow prometheus naming guide 2017-08-12 13:12:58 -07:00
Calvin Montgomery 6043647cb7 Skip full user auth for most page renders
Previously, the user's session cookie was being checked against the
database for all non-static requests.  However, this is not really
needed and wastes resources (and is slow).

For most page views (e.g. index, channel page), just parsing the value
of the cookie is sufficient:

  * The cookies are already HMAC signed, so tampering with them ought to
    be for all reasonable purposes, impossible.
  * Assuming the worst case, all a nefarious user could manage to do is
    change the text of the "Welcome, {user}" and cause a (non-functional)
    ACP link to appear clientside, both of which are already possible by
    using the Inspect Element tool.

For authenticated pages (currently, the ACP, and anything under
/account/), the full database check is still performed (for now).
2017-08-01 21:40:26 -07:00
Calvin Montgomery e780e7dadb Deprecate stats table in favor of prometheus integration 2017-07-17 21:58:58 -07:00
Calvin Montgomery c7bec6251e Begin prometheus integration
Add a dependency on `prom-client` and emit a basic latency metric for
testing purposes.  Add a new configuration file for enabling/disabling
prometheus exporter and configuring the listen address.
2017-07-16 22:35:33 -07:00
Calvin Montgomery 07179d6c83 Upgrade to jsli 2.0 2017-07-08 20:11:54 -07:00
Calvin Montgomery 76e0d1b7ec Use proxy-addr for parsing x-forwarded-for
Closes #683 by providing functionality to trust proxies other than
localhost.
2017-06-27 23:37:18 -07:00
Xaekai 6d4558c978 Allow channel path to be customizable
We now allow server operators to customize the /r/ part of the channel links
The new config option in the template is commented and the config module validates and will terminate with status 78 if an improper value is used.
We've also dropped some old cruft and uses a more elegant method to assign CHANNEL.name

Resolves #668
2017-06-16 20:09:36 -07:00
Calvin Montgomery 8ad9b4e543 Remove redundant template local 2017-06-05 18:57:04 -07:00
Calvin Montgomery 58c65a5bac Use host header instead of req.host which is actually req.hostname 2017-06-05 18:53:36 -07:00
Xaekai 699aa2abe1 Finish validation touchup 2017-06-05 00:06:15 -07:00
Xaekai d42de93d74 Round 2. 2017-06-04 22:16:40 -07:00
Calvin Montgomery de309d675e Remove redundant signing logic from IP session cookie 2017-05-01 21:51:11 -07:00
Calvin Montgomery 8306d2d1b6 Refactor logging 2017-04-04 23:02:31 -07:00
Calvin Montgomery 309cd40da2 Compare owner name case-insensitively when deleting channel 2017-03-21 19:47:31 -07:00
Calvin Montgomery 70be35e3fa Experimental ustream fix 2017-03-02 18:47:47 -08:00
Calvin Montgomery 8719527a31 Enforce HTTPS for new profile images 2016-12-13 22:44:23 -08:00
Calvin Montgomery 35a8e2b52a Fix age old bug with /login redirecting to /register after registration 2016-10-01 21:31:04 -07:00