Commit graph

16 commits

Author SHA1 Message Date
Calvin Montgomery df82d2d4f1 Add registration captcha support 2020-09-22 20:11:34 -07:00
Calvin Montgomery 60a39890f0 Fix hostname comparison in /login 2018-11-11 16:11:51 -08: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 c159fa8060 Remove old HTTPS redirect kludges 2017-09-19 20:49:33 -07:00
Calvin Montgomery 3d50b8f52e Fix getSafeReferrer when referrer is null 2017-08-24 20:55:18 -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 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 07179d6c83 Upgrade to jsli 2.0 2017-07-08 20:11:54 -07:00
Calvin Montgomery 8306d2d1b6 Refactor logging 2017-04-04 23:02:31 -07:00
Calvin Montgomery 35a8e2b52a Fix age old bug with /login redirecting to /register after registration 2016-10-01 21:31:04 -07:00
Xaekai df5c5cd54f The Puggening: Update from Jade to Pug
1.) module dependency updated from jade 1.11.0 to pug 2.0.0-beta3
2.) All references to Jade have been changed to Pug
3.) /srv/web/jade.js is renamed to pug.js
4.) all template files renamed accordingly
5.) "mixin somename" is automatically considered a declaration, invocations must use "+somename"
6.) variable interpolation is no longer supported inside element attributes, use direct references and string concatenation instead.
7.) bumped minor version
2016-07-07 21:48:09 -07:00
calzoneman 5c339656b7 Minor fixes 2015-11-02 20:52:57 -08:00
calzoneman c2726898e5 Move x-forwarded-for middleware 2015-10-27 23:54:32 -07:00
calzoneman 26e8660af4 Change /logout from GET to POST (#515) 2015-10-26 23:21:09 -07:00
calzoneman 0109a87e55 package: build with babel for ES2015 support
* Rename lib/ -> src/
* Add `postinstall` npm target for compiling src files to lib
* Add `build-watch` npm target for development with babel --watch
* Add `lib/` to .gitignore
* Add `source-map-support` module for babel-generated sourcemaps
2015-09-23 19:27:04 -07:00
Renamed from lib/web/auth.js (Browse further)