Commit Graph
189 Commits
Author SHA1 Message Date
carlosalbertorg 9445038b36 fix: Use forwarding_host instead of the renamed forward_ip column
The stream table's forward_ip column was renamed to forwarding_host
back in migration 20210423103500_stream_domain.js, so the stream log
source labels were always showing "undefined" for the forwarding
target. Spotted by @jc21 in review.
2026-09-23 07:00:19 -03:00
carlosalbertorg 4282d6c6e9 feat: Add a Logs viewer to the admin UI
Nginx Proxy Manager had no way to inspect application or nginx logs
from the web UI - admins had to shell into the container or read
`docker logs`. This adds an admin-only Logs page that can tail:

- the backend application log, now also mirrored to
  /data/logs/backend.log (in addition to stdout) and rotated by the
  logrotate timer that already runs every 2 days
- the Let's Encrypt/certbot log, which certbot already writes to
  /data/logs/letsencrypt.log via its existing --logs-dir flag
- per-host nginx access/error logs (proxy, redirection, 404 and
  stream hosts), with the file path always resolved server-side from
  a validated host_type enum + numeric host_id, never from client
  input

Reads use a reverse chunked scan (64KB chunks, capped at 5MB scanned
per request) instead of loading whole files into memory, and the
frontend polls every 5s only while the tab is focused and "Live" is
on, so this stays cheap on both CPU and memory. No new runtime
dependencies were added on either side.

Purely additive: two new admin-only endpoints
(GET /api/logs/sources, GET /api/logs/tail), no existing behaviour
changed.
2026-09-22 13:11:38 -03:00
José M. Requena Plens e4585ac688 Stamp the password change from the app clock, not the database one
Your CI caught this: the check passed on SQLite and never fired on the
stack where the database container runs on a different timezone from the
app, so a stale token stayed valid. The comparison was between a token's
`iat`, which is UTC seconds from Node, and `auth.modified_on`, which the
driver hands back interpreted in the app's timezone. With the app on
Australia/Brisbane and the database on UTC, that column comes back ten
hours in the past and the token always looks newer than the change.

Record the moment in `auth.meta.password_changed_at` instead, written by
`setPassword` with the same `Date.now()` clock that mints `iat`. Same
unit on both sides, one clock, and no timestamp parsing: the Date and
local-string branch is gone, and so is the whole-second flooring that
Postgres microseconds made necessary.

Rows written before this have no marker and revoke nothing until their
next password change, which is the safe direction to be wrong in.
2026-09-06 20:15:12 +02:00
vzagorovskiy a570c0e503 Keep the failed nginx config as a .conf.err file
When `nginx -t` fails, configure() is meant to move the broken config to
<id>.conf.err so the failure can be inspected. renameConfigAsError()
unlinked the source file before renaming it, so the rename always failed
and the config was simply deleted. The deleteConfig() call after it then
removed any .err file left over from an earlier failure.

- unlink the destination .err file instead of the source
- return the rename promise so the delete does not race it
- pass delete_err_file = false so the new .err file survives
- drop the stale 4th argument in the success path, which silently made
  delete_err_file false and left old .err files behind
2026-08-28 11:47:02 +03:00
vgoer 08b4bbdbd4 fix: Changes not taking effect 2026-08-26 07:39:31 +00:00
Jamie Curnow 4e2b052b50 Updated backend packages 2026-08-22 23:10:26 +10:00
Jamie Curnow f53bf88f4d Update cypress docker version, generate custom certs each time 2026-05-19 08:04:49 +10:00
Jamie Curnow ee1f7ba551 Fall back to error code 500 when not set in error object 2026-05-18 16:55:41 +10:00
Jamie Curnow 586dfd36a9 Fix openssl3 formatting of subject cn 2026-05-18 16:12:02 +10:00
Jamie Curnow 2bf9e9b213 Support different cert info output in new version of debian 2026-05-18 15:52:52 +10:00
Jamie Curnow 84886383a7 Fix certificates getting null domain names whgen no cn exists 2026-05-18 15:21:55 +10:00
jc21 d099b00463 Merge pull request #5421 from edklesel/access-list-clients-ordered-insert
Access list clients ordered insert
2026-05-14 11:39:32 +10:00
jc21 13cfa340de Merge pull request #5508 from Zoey2936/fix-5441
Fix bug that allowed any authenticated user to modify their own roles field through the PUT
2026-05-14 10:23:31 +10:00
Jamie Curnow 7d58c579fa Fix backend linting 2026-05-13 13:40:06 +10:00
Jamie Curnow 18b3404f46 Update all packages and fix related problems 2026-05-13 13:27:59 +10:00
Zoey 1ad78af5a0 fix #5441 2026-04-26 14:14:30 +02:00
Edward Klesel 1635e512c7 Change access list client insert to synchronous to ensure order preserved 2026-03-21 21:49:28 +00:00
Jamie Curnow eb67b3bfb6 Regenerate configs improvements
- Fix certificates
- Adds dry run
- code cleanup
2026-03-03 08:44:42 +10:00
Tech-no-1 40f363bd4f Fix uploading of custom certificates 2026-02-17 02:58:18 +01:00
7heMech 1d14f72ba5 Add guardrail for disable 2fa 2026-02-14 06:28:59 +00:00
Jamie Curnow 13fbc53591 Fix bug when adding invalid custom certs 2026-02-10 14:54:33 +10:00
Jamie Curnow d19f5c1960 Fix upgrade problem with otplib existing secrets 2026-02-05 13:12:54 +10:00
Jamie Curnow c88de65d3a Fix #5274 2fa backup codes not validating properly 2026-02-05 10:51:15 +10:00
Jamie Curnow f90066822f Fix v13 otplib upgrades 2026-02-04 07:47:16 +10:00
Jamie Curnow 462c134751 2fa work slight refactor
- use existing access mechanisms for validation
- adds swagger/schema and validation of incoming payload
2026-01-14 11:45:12 +10:00
jc21 582681e3ff Merge pull request #5080 from bzuro/develop
Change visibility to permission_visibility in report.js
2026-01-13 14:52:45 +10:00
jc21 b30f8e47e2 Merge pull request #5109 from piotrfx/develop
Add TOTP-based two-factor authentication
2026-01-13 14:30:48 +10:00
kk.cheng 471b62c7fe Add option to select RSA or ECDSA key type when creating certificates 2026-01-07 19:13:12 +08:00
piotrfx 427afa55b4 Add TOTP-based two-factor authentication
- Add 2FA setup, enable, disable, and backup code management
- Integrate 2FA challenge flow into login process
- Add frontend modal for 2FA configuration
- Support backup codes for account recovery
2025-12-28 11:58:30 +01:00
bzuro da519e72ba Change visibility to permission_visibility in report.js
fix for issue #2014
when even administrator with all_items visibility got 0 proxy hosts in dashboard.
2025-12-14 00:35:22 +01:00
Jamie Curnow cf7306e766 Tweaks to showing new version available
- Added frontend translation for english
- Moved frontend api logic to hook and backend api space
- Added swagger schema for the new api endpoint
- Moved backend logic to its own internal file
- Added user agent header to github api check
- Added cypress integration test for version check api
- Added a memory cache item from github check to avoid hitting it too
  much
2025-11-13 11:20:31 +10:00
Jamie Curnow 8aeb2fa661 Fix #4692, #4856 - stick with auto for scheme in db, change it to $scheme when rendering 2025-11-11 14:46:25 +10:00
Jamie Curnow 4cb85f6480 Fix #4833 supports the usual proxy env vars for outgoing admin related requests 2025-11-05 15:16:42 +10:00
Jamie Curnow 8c37348b65 Properly wrap debug calls 2025-11-04 13:43:52 +10:00
Jamie Curnow 89abb9d559 Fix bugs from feedback 2025-10-29 08:48:29 +10:00
Jamie Curnow 3b9beaeae5 Various tweaks and backend improvements 2025-10-28 11:38:26 +10:00
Jamie Curnow ca3c9aa39a Show cert expiry date in yellow when < 30 days 2025-10-27 19:34:25 +10:00
Jamie Curnow 7b5c70ed35 Fix cert renewal backend bug after refactor 2025-10-27 18:04:58 +10:00
Jamie Curnow e4d9f48870 Fix creating wrong cert type when trying dns 2025-10-27 18:04:29 +10:00
Jamie Curnow 5b7013b8d5 Moved certrbot plugin list to backend
frontend doesn't include when building in react version
adds swagger for existing dns-providers endpoint
2025-10-26 00:28:03 +10:00
Jamie Curnow d0767baafa Proxy host modal basis, other improvements 2025-10-02 08:12:37 +10:00
Jamie Curnow 9339626933 Streams polish 2025-10-02 08:12:37 +10:00
Jamie Curnow a3d17249d0 User table polish and audit log updates 2025-10-02 08:12:37 +10:00
Jamie Curnow da68fe29ac 404 hosts polish 2025-10-02 08:12:37 +10:00
Jamie Curnow 18537b9288 404 hosts add update complete, fix certbot renewals
and remove the need for email and agreement on cert requests
2025-10-02 08:12:37 +10:00
Jamie Curnow 058f49ceea Certificates react table basis 2025-10-02 08:12:33 +10:00
Jamie Curnow efcefe0c17 Fix custom cert writes, fix schema 2025-10-02 08:12:33 +10:00
Jamie Curnow 429046f32e Audit log table and modal 2025-10-02 08:12:33 +10:00
Jamie Curnow 038de3e5f9 Refactor from Promises to async/await 2025-10-02 08:12:28 +10:00
Jamie Curnow 1928e554fd Fix proxy hosts routes throwing errors 2025-10-02 08:12:28 +10:00