Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Trim the value in case it contains newlines (#2480)
Serafeim Papastefanosfd6ebf75982a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d1e98c321e..142d1bc02f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -60,6 +60,7 @@ All notable changes to this project will be documented in this file.- Restore compatibility with older format of shared links [plausible/analytics#2225](https://github.com/plausible/analytics/pull/2225)- Fix 'All time' period for sites with no recorded stats [plausible/analytics#2277](https://github.com/plausible/analytics/pull/2277)- Ensure settings page can be rendered after a form error [plausible/analytics#2278](https://github.com/plausible/analytics/pull/2278)+- Ensure newlines from settings files are trimmed [plausible/analytics#2480](https://github.com/plausible/analytics/pull/2480)### Changed- `script.file-downloads.outbound-links.js` only sends an outbound link event when an outbound download link is clickeddiff --git a/lib/plausible/helpers/config.ex b/lib/plausible/helpers/config.exindex 4640869ffe..aa28255d03 100644--- a/lib/plausible/helpers/config.ex+++ b/lib/plausible/helpers/config.ex@@ -3,7 +3,7 @@ defmodule Plausible.ConfigHelpers dovar_path = Path.join(config_dir, var_name)if File.exists?(var_path) do- File.read!(var_path)+ File.read!(var_path) |> String.trim()elseSystem.get_env(var_name, default)end