Commit Graph

210 Commits

Author SHA1 Message Date
Carly Ho e1ddc65daf Add new user levels 2024-03-16 23:55:51 -05:00
Carly Ho dbdaa90706 update filename 2024-01-29 18:20:49 -06:00
Carly Ho 9feb618bc0 start fucking around with user levels 2024-01-26 22:50:34 -06:00
Cocoa 95e949cbf8 Use dependency reqs from branch being built, not main 2023-08-26 19:46:16 -04:00
Kareila 5e446bd2f8 new ga4_analytics key for %SITE_PAGESTAT_CONFIG 2023-06-11 21:39:24 +00:00
Mark Smith 1d935915d2 Add exception list for captcha 2023-04-05 22:51:43 -07:00
Michael 4374b5b002 Restored close-bracket in config-local.pl.example (#3068) 2023-02-13 14:03:43 -06:00
Mark Smith 5fb77ecf6d Build static in base
This will make web builds faster, at the cost of including static content in
the workers. (Oh well.)
2022-11-10 18:22:05 -08:00
Jen bfe9820342
shop til you drop (#3007)
* site configuration misbehavior: turning off shop components

It is easily possible to disable the individual sections of the shop
that sell icons, points, and rename tokens, but the storefront was
not designed to gracefully handle that configuration.

In the case of points or icons, the cart would throw a generic error
when submitting the form. In the case of rename tokens, the "Add To
Order" button would just silently fail.

Although it is unlikely DW will ever disable these shop items, let's
update the code to be better behaved on general principle.

(Unavailable account levels are already handled in a reasonable manner.)

This also adds the missing 'icons' key to the example %LJ::SHOP hash.

* site configuration misbehavior: turning off the shop entirely

Visiting any shop page with the 'payments' config option turned off
results in a completely blank page and an error in the logs that says:
Argument "The shop is currently disabled." isn't numeric.

Looks like this happened because of a misunderstanding about the intended
return value of DW::Controller::controller. The relevant code comment says
to return "error text" if there was an error, but the error message can't be
just a string, it has to be a server response. Perhaps the behavior was later
updated in order to allow other possible responses such as redirects.

At any rate, the fix is to use error_ml here. The subsequent sysban check
obviously has the same problem, so this fixes that as well.

* [#2974] enforce minimum amount for check/money order payments

Defines a new config parameter $LJ::SHOP_CMO_MINIMUM. If set
to a value greater than zero, that value will be the minimum
"cash" value required to accept check/money order payments.

Fixes #2974.

* [#2328] print the currency to 2 decimal places in receipt email

As reported some time ago, the "Amount Due" was being shown as e.g.
$20.2 instead of $20.20. Future emails will print the amount with
the standard number of decimal places.

Fixes #2328.

* new 'payments_cmo' option for LJ::is_enabled

As mentioned in #2974, it's possible that we may need to
entirely disable paying by check or money order in the
future due to increasing costs. This adds a 'payments_cmo'
test to LJ::is_enabled that will make the switch easy to
flip if that day comes.
2022-11-09 09:03:08 -08:00
Kareila 8f160e3657 [#2897] update boilerplate text for config.pl.example 2022-11-05 23:48:11 -05:00
Mark Smith 9a7b1e6972 Add canary ribbon
This adds an obvious ribbon on the corner of the page if it's rendered
on a web server where $LJ::IS_CANARY is 1.
2022-10-19 10:52:32 +00:00
Mark Smith 067f74a669 dw-free -> dreamwidth
Now that dw-free/dw-nonfree are together, rename the top level repository
so that the name is accurate. Update usages within the code.
2022-10-19 16:06:01 +08:00
Mark Smith 3e997a9d1a Don't need to checkout dw-nonfree
Since it now comes with the dw-free repository, there is no need to get it.
2022-10-19 15:50:54 +08:00
Mark Smith 8a973442be Fix nonfree to always use master for now 2022-10-19 14:46:14 +08:00
Mark Smith 7ab5d82fb4 Rename master to main 2022-10-19 14:00:53 +08:00
alierak 32b7b8a54e
redirect hostnames with underscores before they reach apache (#2984) 2022-10-18 21:06:29 +08:00
Mark Smith c916314e30 Update workflows / base off of GHCR 2022-10-12 18:36:19 +08:00
Mark Smith 269588ed2c Test github actions build 2022-10-12 18:15:35 +08:00
Mark Smith b31a26b445 Change log format to JSON 2022-10-12 11:27:38 +08:00
Mark Smith 168d1739a9 proxy update 2022-10-11 06:17:18 +00:00
Mark Smith 3fe107dc71 Create container for proxy 2022-10-11 05:47:56 +00:00
Mark Smith 544314cbd9 Add Varnish to web container as optional 2022-10-10 15:37:52 +00:00
Mark Smith 7ecea71f20 pass some environment stuff 2022-10-10 08:19:22 +00:00
Mark Smith 8c870486cd Add error logs to docker output 2022-10-10 05:43:26 +00:00
Mark Smith 7640c87d53 Add simple auto-blocking of fraudsters
Bots and scrapers that just get captcha redirects over and over but
never attempt to solve will get blocked. This should be fairly loose so
as not to cause user impact, but will require tuning.

This also adds a simple memcache based tempban system which doesn't
persist to the database.
2022-10-08 23:13:17 +00:00
Mark Smith 0994dd2f32 Simple Captcha
This adds a very simple site-wide captcha (but only on things that go
thru Controller...)

The goal here is to make it so we can replace the external captcha
system that we have today with something that is more controllable and
user friendly, as hCaptcha is pretty accessible.

Next up, I will try to standardize our captchas so that we have only the
one system for doing it, instead of doing it in N different places.
2022-10-08 07:37:03 +00:00
Mark Smith 8137971286 Remove minimal style
We don't configure this in production and I don't plan to, so let's
remove this.
2021-08-23 04:51:12 +00:00
Mark Smith 5a5b4181cf Remove USER_VHOST/ONLY_USER_VHOST settings
This is the only way to travel now, and our security model is built on
separating out cookies by domains.
2021-08-22 21:12:03 +00:00
Mark Smith e1d5c880fa Remove some cruft
We haven't used SERVER_DOWN or SERVER_TOTALLY_DOWN in a decade since we
just mark as down at the load balancer level and bypass Apache entirely.
Let's just remove it.
2021-08-22 19:36:02 +00:00
Mark Smith 2ca769bd41 Add htop, and update for using perl-cpm 2021-02-01 03:44:01 +00:00
Mark Smith b84e31c8f8 Fix tidy, fix dev container 2021-01-31 15:54:12 -08:00
Mark Smith 2c699d141f ARG in wrong place, argh 2021-01-31 15:40:44 -08:00
Mark Smith de936c82ff Small fixes 2021-01-31 15:33:57 -08:00
Mark Smith 1d3e4f9b96 Basic fixes for MySQL 5.7
This is a much smaller set of fixes than my other megabranch, just
targeting certain things for MySQL 5.7.

This also adds a Dockerfile that doesn't 100% work yet, tetsing.
2021-01-31 15:28:50 -08:00
Mark Smith 90dabbe72d Switch to cpm for install (parallel, way faster) and bump List::Util 2021-01-31 14:15:15 -08:00
Mark Smith 786f1ddb06 Break up base dockerfile into two parts 2021-01-31 13:30:29 -08:00
Kareila 6a7b406710 Remove unused config variables $MSG_DB_UNAVAILABLE and $MSG_NO_COMMENT
One was commented out, but neither was ever used anywhere in any case.
2020-12-06 21:57:06 -08:00
Kareila 7e66cf93ff [#2764] remove bml suffix from faqbrowse links in site configs 2020-07-16 20:23:07 -07:00
Nick Fagerlund fecdeb3a94 Replace opt-in s2foundation beta with opt-out nos2foundation beta
Opt-out betas are a little weird. Also, to keep the diff small, I'm switching
these "if" statements to "if (!)" instead of rewriting them; we'll hopefully be
removing them soon anyway.
2020-07-12 21:51:59 -07:00
Nick Fagerlund 37947e5c65 Add $LJ::STATDOCS to example config-local.pl
Tooling seems to rely pretty heavily on this, so it's weird to omit it.
2020-07-12 21:47:51 -07:00
Jen 4fa9048155
change default journal style on new installations (#2645)
I couldn't find an issue open for this but I know we've talked about it on Discord: the default journal style for over a decade has been 'negatives/black', which isn't TR-based and doesn't support the newer features present in most other journal styles.

This changes the default style defined in config.pl.example to 'ciel/indil' which I picked because it wasn't nonfree and seemed pleasantly neutral. I also didn't want to pick the same default style that we have been using in production ('practicality/neutralgood') because I thought that might be too much of the same thing across different sites.

This will only affect future installations that don't have an existing config.pl file.
2020-05-04 18:08:47 -07:00
Mark Smith a8e7b56322 Remove xpost from k8s 2020-04-27 11:16:16 -07:00
Mark Smith 2b5401eb8f deploy web 2020.02.05.01 2020-02-06 06:33:03 +00:00
Mark Smith cff3192133 Don't let failed workers sit around forever 2020-02-06 05:29:59 +00:00
Mark Smith d6e7c904c2 Give workers a type 2019-12-15 01:39:00 -08:00
Mark Smith cd237dbe20 Worker startup script. 2019-12-11 19:42:16 -08:00
Mark Smith cf9aed697e Worker updates. 2019-12-11 19:41:00 -08:00
Mark Smith 74d4f97089 Update workers 2019-12-07 22:19:16 -08:00
Mark Smith 11eaa988f0 Datadog cluster metrics agent 2019-12-07 22:19:16 -08:00
Mark Smith 85a4562906 Update kubernetes workers
Adds codebuild worker
Adds datadog cluster agent
Tweaks some things
2019-12-06 22:00:11 -08:00