fix: Restore detection of letsencrypt certificate file changes#2326
fix: Restore detection of letsencrypt certificate file changes#2326polarathene merged 8 commits intomasterfrom
Conversation
The `DYNAMIC_FILES` var was quote wrapped, treating all filepaths to create checksums for as a single string that would be ignored instead of processed individually. Removed the quotes, and changed the for loop to an array which accomplishes the same goal.
`SC2068: Double quote array expansions to avoid re-splitting elements.`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The GitHub WebUI does not support pre-commit hooks, correct. I do not regard the Debian 11 commit as a necessity for a new major, so I'm very much fine with either
|
😆 😆 😆 |
This comment has been minimized.
This comment has been minimized.
Failure is due to log truncation, increase size to 3000 bytes (arbitrary value that is large enough) like already used in this test file to resolve the failure.
If the value provided does not have the wildcard prefix `*.`, then no value was returned. `SSL_DOMAIN` does not have to have the wildcard prefix, nor should the method (with the current name and behaviour) output no result when used on FQDN without wildcard prefix. This would otherwise cause some unexpected results, which could hang some logic.
`acme.json` change would extract new cert files, which would then be hashed after restarting services and considered a change event, running through the logic again and restarting services once more when that was not required. The checksum entries for those cert files are now replaced with new entries containing updated checksum hashes, after `acme.json` extraction.
|
Tests resolved, fixed another bug (didn't previously affect any tests as the method was only ever used with Refactored the
The two tests passed locally, I expect all tests to be good now 👍
|
georglauterbach
left a comment
There was a problem hiding this comment.
LGTM 👍
I will have a look at the if-then-else thing today.
Description
The
DYNAMIC_FILESvar was quote wrapped, treating all filepaths to create checksums for as a single string that would be ignored instead of processed individually.Removed the quotes, and changed the for loop to an array which accomplishes the same goal.
This was discovered while investigating #2321, but it's unclear if this will fix that issue.
This bug was introduced in #2279 with the
v10.3.0release.We may want to branch that release tag and cherry pick this commit from master to publish a bugfix (as we've already merged(RESOLVED: Decision was to release inv11changes to master, the bugfix branch is the only way to backport it I think?).v10.4.0with the Debian upgrade)Type of change
Checklist:
It'd probably be a good idea to add a test that verifies the cert path is in the checksum file, I'm just a bit pressed on time and resources currently but wanted to get this fix raised while I could spare the time.
If there's no rush to merge I can sort out tests within 7 days depending on how events pan out on my end 😅