mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[PR #4746] [CLOSED] Parse certificate expiration date and domains for custom API uploaded certificates #3948
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#3948
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/4746
Author: @Oratorian
Created: 8/30/2025
Status: ❌ Closed
Base:
develop← Head:develop📝 Commits (2)
3215bafParse certificate expiration date and domains for custom certificates3b1f4ceFixed! The linting error📊 Changes
2 files changed (+67 additions, -2 deletions)
View changed files
📝
backend/internal/certificate.js(+61 -1)📝
backend/schema/components/certificate-object.json(+6 -1)📄 Description
fix: Parse certificate expiration date and domains for custom certificates
Extended GitHub Summary:
Problem
When uploading custom certificates via API, NPM was incorrectly setting the expiration date to the current timestamp instead of parsing it from
the certificate. This caused certificates to show as "already expired" even when they were valid for years. Additionally, domain names were not
being properly extracted from certificates.
Root Cause
The certificate model's
$beforeInsert()method setsexpires_on = now()when the field is undefined. Since API payloads for "other" providercertificates don't include
expires_on, all API-uploaded certificates received the current timestamp as their expiration date.Solution
getCertificateInfo()function to extract Subject Alternative Names usingopenssl x509 -textexpires_onfield is set to actual certificate expiration date for custom certificatesTesting
Verified with custom CA certificates that:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.