Trek_CN/server/tests/integration
Julien G. 6072b969d6
Bug fixes - May 2nd 2026 (#941)
* fix: collab chat input hidden by mobile bottom nav bar

Closes #939

* chore: prepare database for nest + typeorm

* fix(ssrf): relax internal network resolution (#947)

* docs(ssrf): update Internal-Network-Access wiki to reflect relaxed guard

Loopback, link-local, and .local/.internal hostnames are now all
overridable with ALLOW_INTERNAL_NETWORK=true (commit 9a08368). Merge
the two-tier "always blocked / conditionally blocked" structure into a
single table, add a warning about cloud metadata exposure.

* fix(ssrf): let .local/.internal hostnames pass to IP-level checks

The pre-DNS hostname block was redundant: any .local/.internal host
that resolves to a private IP is already gated by isPrivateNetwork +
ALLOW_INTERNAL_NETWORK, and any that resolves to loopback/link-local
is caught by isAlwaysBlocked unconditionally.

Dropping the hostname pre-check means Docker/LAN deployments can reach
services on .local hostnames (e.g. immich.local) with
ALLOW_INTERNAL_NETWORK=true, while loopback and link-local IPs
(including 169.254.169.254) remain hard-blocked with no override.

Reverts the isAlwaysBlocked guard loosening from 9a08368.

* fix(auth): trim username and email on all write paths

Self-registration stored values verbatim, so trailing whitespace could
produce rows that lookup code (which trims input) silently misses.
Trim username and email before validation and INSERT in registerUser,
adminService.updateUser, and oidcService.findOrCreateUser. updateSettings
and adminService.createUser already trimmed correctly.

Adds a one-shot backfill migration (trimUserWhitespace) that trims
existing dirty rows; collisions are resolved by appending __migrated_<id>
to the value with a loud console.warn so operators can review affected
accounts.

18 new tests covering registration trim, duplicate detection, admin
update trim, trip-member lookup regression, and all migration branches.

* feat(notices): add v3014-whitespace-collision admin notice

Adds a dismissible banner for admins on v3.0.14+ that fires only when
the whitespace-trimming migration detected a username/email collision
(stored in app_settings as whitespace_migration_collision=true).

Notice conditions: existingUserBeforeVersion(3.0.14) + role=admin +
custom predicate reading the app_settings flag. Predicate registered in
registry.ts; migration step writes the flag when hadCollision=true.

All 15 translation files updated with title/body keys.
7 integration tests added (SN-COLLISION-1 through -7) covering all
condition branches: shown when all conditions met, hidden when flag
absent/false, hidden for non-admin, hidden for new user, hidden below
min app version, hidden after dismissal.
2026-05-03 17:39:45 +02:00
..
admin.test.ts Bug fixes - May 2nd 2026 (#941) 2026-05-03 17:39:45 +02:00
assignments.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
atlas.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
auth.test.ts Bug fixes - May 2nd 2026 (#941) 2026-05-03 17:39:45 +02:00
backup.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
budget.test.ts Bug fixes - April 30th 2026 (#936) 2026-05-01 01:43:19 +02:00
categories.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
collab.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
dayNotes.test.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00
days.test.ts Bug fixes - April 30th 2026 (#936) 2026-05-01 01:43:19 +02:00
files.test.ts fix(backups,files): auto-backups rejected by validator; trip file download broken after cookie migration 2026-04-21 11:18:17 +02:00
immich.test.ts fix(tests): update test helpers and assertions for migration-98 photo schema 2026-04-14 13:54:48 +02:00
journey.test.ts fix: update backend tests and service bugs for gallery 1-to-N schema 2026-04-22 16:05:18 +02:00
maps.test.ts fix(search-autocomplete): address PR #542 review issues 2026-04-15 04:16:56 +02:00
mcp.test.ts fix(test): bumb default limit to reflect implementation 2026-04-11 02:32:17 +02:00
memories-immich.test.ts fix(journey): paginate Immich picker and group photos by date 2026-04-16 15:32:56 +02:00
memories-synology.test.ts fix(synology): correct multi-album passphrase assignment and stale trek_photos 2026-04-17 19:48:12 +02:00
memories-unified.test.ts fix(tests): update test helpers and assertions for migration-98 photo schema 2026-04-14 13:54:48 +02:00
misc.test.ts fix: skip FORCE_HTTPS redirect for /api/health endpoint 2026-04-19 14:10:41 +02:00
notifications.test.ts feat(notifications): add ntfy as a first-class notification channel 2026-04-15 13:59:25 +02:00
oauth.test.ts security(oauth): harden OAuth 2.1/MCP implementation (Critical + High + Medium findings) 2026-04-10 02:03:27 +02:00
oidc.test.ts security: close SEC-H4/H6 gaps from second-pass review 2026-04-20 21:35:30 +02:00
packing.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
places.test.ts feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
profile.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
reservations.test.ts Bug fixes - April 30th 2026 (#936) 2026-05-01 01:43:19 +02:00
security.test.ts test: apply suite review improvements (01–11) 2026-04-06 20:08:13 +02:00
settings.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
share.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
systemNotices.test.ts Bug fixes - May 2nd 2026 (#941) 2026-05-03 17:39:45 +02:00
tags.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
todo.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
trips.test.ts Bug fixes - May 2nd 2026 (#941) 2026-05-03 17:39:45 +02:00
vacay.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
weather.test.ts test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00