Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange \n\n inside the lets encrypt requested certificate file used for custom domain and sites. #293

Closed
akubima opened this issue Jun 12, 2023 · 8 comments

Comments

@akubima
Copy link

akubima commented Jun 12, 2023

CloudPanel version(s) affected

2.3.0

Description

Hi, I hope you are okay.

I wanted to let you know that there is a strange "\n\n" in the middle of the SSL certificate file /etc/nginx/ssl-certificates/custom-domain.crt this happened after I tried to change the domain name for CloudPanel access which automatically requests SSL from lets encrypt. This made the NginX web server completely unusable until I manually fixed it by removing the "\n\n" in the SSL file and restarts the NginX.

image

How to reproduce

Create a custom domain to access the panel until it successfully requests SSL from letsencrypt and open /etc/nginx/ssl-certificates/custom-domain.crt, if the bug doesn't happen there might be something wrong with my server.

Possible Solution

Maybe changing a few lines of code will fix it.

Additional Context

Nope, have a great day, thanks!

@akubima
Copy link
Author

akubima commented Jun 12, 2023

Actually, every time I request SSL from letsencrypt, a strange "\n\n" appears in the middle of the certification file including hosted sites.

@cloudpanel-io
Copy link
Owner

Can you reproduce the problem? Over 99% of the people don't have this problem, but sometimes people report it.

We need to find a way to reproduce it.

@akubima
Copy link
Author

akubima commented Jun 13, 2023

Yep the bug always happens when I request a certificate from letsencrypt trough cloudpanel and I have to fix it manually by removing the \n\n in all SSL cert files, then restart nginx.

@cloudpanel-io
Copy link
Owner

Can you please come into our discord server? I want to debug the issue on your server, I can't reproduce it.

Our discord server: https://discord.cloudpanel.io

@akubima
Copy link
Author

akubima commented Jun 15, 2023

Sure, I've joined the discord as peppermint#8216 what should I do next?

@cloudpanel-io
Copy link
Owner

Sure, I've joined the discord as peppermint#8216 what should I do next?

I have sent a friend request in discord. I will get in touch with you there via dm after accepting the request.

@cloudpanel-io
Copy link
Owner

cloudpanel-io commented Jun 15, 2023

I have fixed the issue.

To apply the patch, please do:

  1. Login via SSH and become root

  2. Execute the following command to apply the patch:

curl -s https://gist.githubusercontent.com/swieczorek/9ae3e75dfbdaba9dc5c3993dd5543eb2/raw/19463e5024fdb0b068ce2c97d2e5a3a092325d73/gistfile1.txt > /home/clp/htdocs/app/files/src/Site/Ssl/LetsEncryptClient.php

Fixed in v2.3.1, which will be released next week.

@akubima
Copy link
Author

akubima commented Jun 15, 2023

Wow, that just works great, thank you so much, I really appreciate it. 👍

@akubima akubima closed this as completed Jun 15, 2023
@akubima akubima changed the title Strange \n\n inside the certificate file used for custom domain. Strange \n\n inside the lets encrypt requested certificate file used for custom domain and sites. Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants