Skip to content

google dns challenge fails due to improperly escaped private key #2868

Closed as not planned
@valsr

Description

@valsr

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • No
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
Let's encrypt google DNS challenge fails due to improperly formatted key (Error parsing credentials file '/etc/letsencrypt/credentials/credentials-20': [('DECODER routines', '', 'unsupported')]). This might be due to escaping the certificate meta data in backend/internal/certificate.js:877 which replaces the '\n' characters in the private_key field to '\n' (doing a cat /etc/letsencrypt/credential/* shows a double \n where a single one should be). See image below:
image

Note the upload form posts data with escaped new lines as such:
image

Nginx Proxy Manager Version
2.10.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to SSL Certificates
  2. Click on 'Add SSL Certificate'
  3. Click Use a DNS Challenge
  4. Select Google as DNS provider
  5. Enter Google DNS Credentials
  6. Agree to TOS
  7. Press Save
  8. See error

Expected behavior
SSL Challenge succeeds

Screenshots
image

Operating System
Alpine Linux 3.16

Additional context
Running inside Proxmox container using scripts from https://github.com/ej52/proxmox-scripts/tree/main/lxc/nginx-proxy-manager

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions