Skip to content

Commit

Permalink
systemd: ignore comments in /etc/crypto-policies/config
Browse files Browse the repository at this point in the history
fixes: #21311
  • Loading branch information
tomasmatus authored and martinpitt committed Nov 25, 2024
1 parent 07a2d27 commit 1f14cc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/systemd/overview-cards/cryptoPolicies.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export const CryptoPolicyRow = () => {
} catch (error) {
console.warn("Failed to get current crypto policy:", error.toString(),
"; falling back to /etc/crypto-policies/config");
setCurrentCryptoPolicy(contents.trim());
const filteredContent = contents?.split('\n').filter(line => !line.startsWith("#")).join('\n');
setCurrentCryptoPolicy(filteredContent?.trim() ?? null);
}
});
// RHEL-8-8 has no SHA1 subpolicy
Expand Down

0 comments on commit 1f14cc1

Please sign in to comment.