Commit Graph
330 Commits
Author SHA1 Message Date
Jamie Curnow 5b7e34eb67 Fix second round of review findings from PR #6029
Security
- Check advanced_config permissions before creating a certificate on
  host update (proxy, redirection and 404 hosts). A refused request
  previously requested a Let's Encrypt certificate first, leaving an
  orphan certificate and using up rate limit.
- Only trust X-NPM-Peer-Addr when it comes with a secret generated at
  container start. The admin nginx sends both headers. Any proxy host or
  stream forwarding to 127.0.0.1:3000 was also a loopback peer, so it
  could forge the header and get a fresh rate-limit bucket on every
  request. Without the secret (dev, or a mounted production.conf), the
  header is ignored.
- Add a login limit per IP across all accounts (30 failed attempts a
  minute) alongside the per-account one. Before this, one address could
  spray passwords over any number of accounts. Behind a shared proxy,
  everyone using that proxy shares this limit.
- Stop trusting X-Real-IP from loopback. It was only there for an older
  version of the rate limiter, and it let a stream host forwarding to a
  local proxy host forge the client IP and get past IP access lists.
  Loopback now behaves as it does on master.

Correctness
- Refuse to delete a certificate that hosts still use (400, with counts
  per host type). Their configs include its files, and a successful
  revoke deleted them anyway, which broke nginx -t. Otherwise the
  certificate is revoked and its files are removed even if the revoke
  fails.
- Let non-admins clear a location's advanced config. Deleting the
  location was already allowed and has the same effect, and a location
  deleted and re-added at the same path arrives with an empty config,
  which was refused.
- Clear proxy host grants (meta.proxy_host_ids) when visibility isn't
  "user" or proxy hosts are hidden, and drop ids of deleted hosts.
  Before, hidden grants came back when proxy hosts were shown again.
  The backend enforces this; the permissions modal also stops sending
  them.
- 404 host and redirection host modals now wait for the current user
  to load, so an admin's advanced config change isn't dropped if they
  submit before it loads.

Tests
- NonAdminHosts.cy.js: refused change doesn't create a certificate,
  location rename and clear rules, grant clearing.
- Certificates.cy.js: deleting a certificate that is in use.
2026-11-09 23:39:26 +10:00
Jamie Curnow 04c1f5ae76 Fix review findings from PR #6029
Security
- Redact certbot output before it reaches the API: strip the
  certificate's DNS credential values, URL query strings and userinfo,
  secret-looking key=value pairs and Bearer/Basic tokens. DNS plugins
  can echo request URLs carrying API keys. The raw CommandError is no
  longer attached as `previous`, since the error handler returns
  `previous` to the client on certificate routes.
- Rate limit login/2FA on the admin nginx's real TCP peer, passed as
  X-NPM-Peer-Addr ($realip_remote_addr), instead of X-Forwarded-For.
  nginx trusts X-Real-IP from private ranges, so a client on the LAN or
  Docker network could get a fresh bucket on every request. Behind
  another proxy, limits now apply per account through that proxy.
- Bound rate limiter memory: hash keys over 128 chars and cap each store
  at 50k entries, removing expired entries first and then the oldest.

Correctness
- Proxy host modal: send location advanced configs unchanged for
  non-admins instead of looking them up by path, which dropped the
  config from a renamed location.
- Location advanced config: locations that omit advanced_config now get
  a config only after explicit ones are matched, so a new location at
  an old path can't take the config from the renamed location.
- Certificate upload: check that the certificate matches the private
  key (uploaded or stored) before writing, so a mismatched pair can't
  break nginx -t.
- Certificate delete: keep the Let's Encrypt files when revoke fails and
  hosts still use the certificate, so their configs still load.

Cleanup
- Make the rate-limit certbot hint first in the list, as its comment
  says.
- Proxy host getCount uses the permissions access has already loaded
  instead of querying user_permission again.
- Rate limiter: register the success refund listener in one place and
  call it a fixed window, not a sliding one.
2026-11-09 22:53:53 +10:00
occultsound 15beff767d Add Traditional Chinese (Taiwan) translation 2026-11-09 02:16:59 +08:00
Stephan Paternotteandgreptile-apps[bot] e824d353f0 Update frontend/src/locale/src/nl.json
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-11-07 15:55:09 +01:00
Stephan Paternotte 3f2c186771 Update nl.json
Lang: Dutch translation file updated + some minor corrections
2026-11-07 15:47:16 +01:00
Abdulhafiz Davlatov bc8bbf3562 feat: rate limit auth endpoints and scope user proxy host permissions
- Add in-memory sliding window rate limiter for auth token endpoints with CI/test bypass and successful request exclusion
- Add user_permission meta column migration and Objection model configuration
- Support scoping allowed proxy hosts per user when in 'Created Items Only' visibility mode
- Restrict advanced nginx configuration editing on hosts to admin users only
- Fix user permissions route ID parsing and omit id from permission update payloads
- Add allowed proxy hosts selector in permissions modal and display permissions summary badges in users table
2026-11-05 12:16:36 +05:00
jc21 9be1cb7818 Merge pull request #5917 from nglinh28/feat/vietnamese-locale-update
i18n(vi): complete Vietnamese locale and add vi tests
2026-11-05 10:30:02 +10:00
jc21 fe58b4eba0 Merge pull request #5889 from StopDragon/i18n/ko-missing-keys
Update Korean translation
2026-11-05 10:25:43 +10:00
jc21 5795699091 Merge pull request #5939 from hafizahmedzia/fix/http-certificate-result-keys
fix: preserve hostname keys in HTTP certificate test results
2026-11-05 10:05:11 +10:00
jc21 4daa54c12e Merge pull request #5977 from mirfalltnixein/fix/unsaved-modal-changes
Prevent data loss when dismissing unsaved forms
2026-11-05 08:58:53 +10:00
jc21 bd34c94222 Merge pull request #5993 from SebZar/feat/certificate-details-tooltip
feat: show certificate details in host tables
2026-11-05 08:42:57 +10:00
mikeyheneinandClaude Opus 5.5 c68456b205 Frontend: refresh dependencies, react-intl 12, vitest 5, happy-dom 21; fix Tabler 1.7 regressions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 20:28:37 -08:00
zarges.sandClaude Opus 5.5 d0739b7210 fix: drop DNS provider from certificate popover
Host endpoints clear the certificate meta, so the DNS provider is never
available in the host tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:36:15 +01:00
zarges.sandClaude Opus 5.5 435ddeee34 feat: show certificate details in host tables
The SSL column of the proxy, redirection, 404 and stream host tables
only showed the certificate type, so it was not possible to tell which
certificate a host uses.

- Popover on the SSL column with name, ID, provider (incl. DNS
  provider), domain names and expiry date
- SSL label turns red when the certificate is expired and yellow when
  it expires within 30 days
- Custom certificates show their name below the label

Refs #5705

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:16:22 +01:00
mirfalltnixein 50d413f464 Protect partial location and auth drafts 2026-10-28 00:34:50 +01:00
mirfalltnixein 5e76f904ee Address modal safeguard review feedback 2026-10-28 00:30:52 +01:00
mirfalltnixein 6838868fdc Prevent dismissing unsaved form modals 2026-10-28 00:04:24 +01:00
Hafiz Ahmed Zia 9972e78dc8 fix: preserve hostname keys in HTTP certificate test results
Preserve raw response keys for the HTTP certificate test endpoint so
hostname punctuation and distinct result entries survive normalization.
Add API and mounted-modal regression coverage for the exact candidate
reviewed against develop 56ab784117.

Related: NginxProxyManager/nginx-proxy-manager#5849

AI assistance: Codex assisted with the implementation, tests, independent
review and contribution text.
2026-10-12 08:36:32 +05:00
Alexis Loskoutoff 41713715ca Improve existing french translations 2026-10-11 22:55:39 +02:00
Alexis Loskoutoff 06b02f7731 Add missing FR translations 2026-10-11 21:53:42 +02:00
Juice-de-Orange 3270873cc8 Add missing German (de) and Italian (it) translations 2026-10-06 20:42:18 +02:00
nglinh28andClaude Sonnet 5 e7e69abb84 i18n(vi): complete Vietnamese locale and add vi tests
- Translate the keys added for the logs feature and access list
  inheritance so the Vietnamese UI has full key coverage
- Update Vietnamese help docs for access lists, certificates, hosts
  and streams
- Use a 24-hour clock for Vietnamese date and time formatting
- Add tests that check Vietnamese key coverage, ICU placeholders and
  that strings are translated

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-03 09:28:36 +07:00
JUNG JI YONG ccbffa76ff Update Korean translation
- Add missing strings (2FA, logs, per-location access lists, etc.)
- Fix translations that didn't match the UI context
- Minor wording fixes in Korean help docs
2026-09-25 23:19:18 +09:00
Jamie Curnow 2cfd3395cf Adds integration tests for per path access lists, fixes ipv6 jsv,
and enforces host-wide access list when location access list is not set
2026-09-24 12:21:49 +10:00
Dimas R. Wisnu 900bb1e480 fix: resolve merge conflicts breaking frontend CI
- LocationsFields: remove duplicated conflict block, integrate AccessField
  into the Row-based layout (fixes JSX parse error)
- ProxyHosts/Table: migrate to updated @tanstack/react-table API (useTable,
  createColumnHelper<Features, ProxyHost>)
- Add missing Estonian translations (action.logs, column.error)
- Re-sort en.json locale keys
2026-09-23 19:18:51 +07:00
Dimas Rakha Wisnu 633b653f79 Merge branch 'develop' into develop 2026-09-23 18:53:06 +07:00
jc21 c53f52ab51 Merge pull request #5878 from carlosalbertorg/feat/log-viewer
feat: Add a Logs viewer to the admin UI
2026-09-23 20:23:26 +10: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
BigHulk 50144205a0 fix(router): redirect authenticated login visits to dashboard 2026-09-22 18:22:57 +08:00
jc21 9ad799c13f Merge pull request #5869 from zalaghi/feat/persian-locale
Add Persian locale
2026-09-21 07:25:22 +10:00
qwist1233-cpuandClaude Fable 5.1 735149210e Add missing Turkish (tr) translations
Adds the 31 keys present in en.json but missing from tr.json (2FA, certificate key type, trust forwarded proto).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 11:05:01 +03:00
Amir Zalaghi 0e152e8afe Add Persian locale 2026-09-18 22:12:13 +02:00
jc21 58605cbc70 Merge pull request #5848 from siimaarmaa/develop
Translate the entire user interface into Estonian and ensure that the Estonian flag is displayed./Tõlgi kogu kasutajaliides eesti keelde ja kinnita Eesti lipp.
2026-09-09 10:11:03 +10:00
jc21 280fcde528 Merge pull request #5834 from 12LuA/patch-1
Remove broken sorting from Audit Logs
2026-09-09 07:27:36 +10:00
Cursor AgentandSiim Aarmaa f477946bd9 Tõlgi kogu kasutajaliides eesti keelde ja kinnita Eesti lipp.
UI-tekstid olid eesti keele valikus, aga sisu oli inglise keeles. Nüüd on et.json täielikult eesti keeles (sh puudunud võtmed), abitekstid ühtlustatud ja lipukoodiks jääb EE (Eesti), mitte ET (Etioopia). Kuupäevad kasutavad et-EE lokaati ja 24-tunnist kellaaega.

Muudatuse tegi Aarmaa IT - Siim Aarmaa

Co-authored-by: Siim Aarmaa <siimaarmaa@users.noreply.github.com>
2026-09-08 15:52:39 +00:00
Jamal 2070fd186a Add Azerbaijani locale 2026-09-07 11:58:07 +04:00
Luca 24b072a120 fix: Rename user.avatar to owner and disable sorting 2026-09-06 17:31:47 +02:00
jc21 ece5dea0ad Merge branch 'develop' into develop 2026-08-28 07:57:25 +10:00
tapacko d77d5c643d Add Ukrainian locale 2026-08-26 23:39:25 +01:00
jc21 a7677c18c3 Merge branch 'develop' into feat/collapsible-custom-locations 2026-08-26 13:00:05 +10:00
jc21 5e7fea7d56 Merge pull request #5787 from CallMeLeon167/develop
Add German translations for two-factor authentication and some UI elements
2026-08-26 12:54:23 +10:00
Jamie Curnow 09300941af Add white padding to qrcode, especially in dark mode 2026-08-26 12:48:36 +10:00
vgoer 4d30946d2f fix: local QR code 2026-08-25 09:14:44 +00:00
Jamie Curnow 4ecb047299 Update frontend packages
- Major update for react-table
- Fix Hosts menu staying around after selecting a menu item
2026-08-22 23:23:20 +10:00
Daniel Jacob Butcher fc8b1eb1fb Fixed Estonian flag bug
The Estonian flag was appearing as an Ethiopian flag, due to a mixup of ISO 639 language codes and ISO 3166 country codes
2026-08-20 00:04:47 +03:00
Leon Schmidt 70f00d60be Add German translations for two-factor authentication and various UI elements 2026-08-18 10:19:06 +02:00
Dimas R. Wisnu 4a0f212289 feat: per-path access lists, host logs modal, PostgreSQL support
- Per-path access lists: assign different access lists to individual
  locations on the same proxy host
- Host logs modal: view access/error logs from proxy host dropdown
- PostgreSQL JSON containment query (@>) for location regeneration
- Locale keys: action.logs, column.error
2026-08-07 16:40:32 +07:00
Fatih Emre ab96d78f4d Collapse custom locations into a filterable list
The Custom Locations tab rendered every location fully expanded, which
becomes unusable once a host has more than a handful of them. Each row is
now a collapsible card showing its path and forward target, collapsed by
default, with the Add Location button moved to the top so it stays
reachable without scrolling to the end of the list.

A filter appears once there are five or more locations and matches on the
path as well as the forward scheme, host and port.

New locations are still appended to the end of the list, so the generated
nginx config is unchanged.

Also fixes two existing issues in this component: the per-location inputs
shared the same DOM ids across rows, and the advanced-config toggle state
was keyed by array index, so removing a location moved it onto the wrong
row.
2026-08-04 16:11:46 +03:00
jc21 79a4128b78 Merge branch 'develop' into develop 2026-05-31 22:04:14 +10:00
Jamie Curnow 8b256c33e9 Sorted fr locale 2026-05-18 15:55:54 +10:00