Fix certificate renewal#209

Merged
6543 merged 4 commits from crystal/pages-server:pr-renew-fix into main 2023-03-20 23:57:27 +01:00
Member

A database bug in xorm.go prevents the pages-server from saving a
renewed certificate for a domain that already has one in the database.

A database bug in xorm.go prevents the pages-server from saving a renewed certificate for a domain that already has one in the database.
Fix certificate renewal
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
702392f8bc
A database bug in xorm.go prevents the pages-server from saving a renewed certificate for a domain that already has one in the database.
Author
Member
[don't know why this doesn't work](https://ci.codeberg.org/Codeberg/pages-server/pipeline/201) [it passed here](https://ci.cryxtal.org/crystal/pages-server/build/20)
@ -65,3 +65,3 @@
defer sess.Close()
if exist, _ := sess.ID(c.Domain).Exist(); exist {
if exist, _ := sess.ID(c.Domain).Exist(c); exist {
Contributor

just use a new(Cert) as that make sure Exist dont try to match other fields

just use a new(Cert) as that make sure Exist dont try to match other fields
6543 marked this conversation as resolved
6543 approved these changes 2023-03-20 23:56:57 +01:00
6543 merged commit c40dddf471 into main 2023-03-20 23:57:27 +01:00
6543 referenced this pull request from a commit 2023-03-20 23:57:27 +01:00
6543 added this to the v4.6.2 milestone 2023-03-21 00:03:07 +01:00
Sign in to join this conversation.
No description provided.