16 Commits

Author SHA1 Message Date
Valentyne Stigloher
314c3553ad (nuxt) rename env variables that fill nuxt runtime configuration to NUXT_* so that they can be passed at runtime 2025-02-15 14:27:01 +01:00
Adaline Simonian
23a3862ca0
test: introduce snapshot-based smoke tests
- Adds a new test suite with Docker-based smoke tests for all locales.
  Can be run using the ./smoketest.sh script.
- Replaces all calls to Math.random() with a new helper that returns 0.5
  in snapshot testing mode, ensuring deterministic snapshots.
- Similarly replaces all calls to new Date() and Date.now() with new
  helpers that return a fixed date in snapshot testing mode.
- Replaces checks against NODE_ENV with APP_ENV, to ensure that the
  bundles can be built with Nuxt for testing without losing code that
  would otherwise be stripped out by production optimizations.
- Adds a database init script that can be used to initialize the
  database with a single admin user and a long-lived JWT token for use
  in automation tests.
- Adds a JWT decoding/encoding CLI tool for debugging JWTs.

Note: Snapshots are not checked in, and must be generated manually. See
test/__snapshots__/.gitignore for more information.
2025-02-02 23:11:19 -08:00
Benjamin
bbfa210340 JS Modernization (@benshawmean) 2025-01-16 22:24:08 +00:00
Andrea Vos
6d8dbbb617 fix types 2024-12-31 11:35:12 +01:00
Andrea Vos
1055e3b5bd split audit log into a separate database and compress payload 2024-12-31 11:17:37 +01:00
Andrea Vos
a951b721f3 (lint) 2024-12-29 13:28:02 +01:00
Andrea Vos
a5951d4557 (security) prevent malicious subdomain attack when setting avatar 2024-12-29 13:20:52 +01:00
Andrea Vos
f18630077c (bug)(security) validate avatarSource 2024-12-28 10:07:37 +01:00
Andrea Vos
f792c4fcbf (user)(auth) don't use mastodon id as a placeholder email; alert if placeholder used as an email - cleanup 2024-11-11 22:15:17 +01:00
Andrea Vos
ea42bd959a Merge branch 'alert-placeholder-email' into 'main'
(user)(auth) don't use mastodon id as a placeholder email; alert if placeholder used as an email

See merge request PronounsPage/PronounsPage!539
2024-11-11 19:49:27 +00:00
Valentyne Stigloher
3e5a0b12f2 (dependencies) replace jsonwebtoken with jose which does not need crypto polyfill 2024-11-10 21:59:56 +01:00
Andrea Vos
76ce55f1ed (user)(auth) don't use mastodon id as a placeholder email; alert if placeholder used as an email 2024-11-09 19:41:01 +01:00
Valentyne Stigloher
b25afefc49 (fmt) 2024-10-29 10:56:32 +01:00
Valentyne Stigloher
9e96ea187f (api) use definedCachedFunction to for banner name, the actual image is stored separately 2024-10-18 18:30:01 +02:00
Valentyne Stigloher
71a562bba9 (nuxt) do not use import.meta.url directly to reference other files as this breaks in Nitro, use current working directory as convention 2024-09-12 10:11:25 +02:00
Valentyne Stigloher
a99199f322 (nuxt) integrate express as server handler while preventing Nuxt from scanning server directory 2024-09-11 21:29:35 +02:00