gethomepage / homepage

A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.
https://gethomepage.dev
GNU General Public License v3.0
18.73k stars 1.1k forks source link

Trim whitespace and quotes in variable substitution #3642

Closed christiaangoossens closed 3 months ago

christiaangoossens commented 3 months ago

Proposed change

The new code trims quotes ( ' and " ) and surrounding whitespace off any environment variables that are to be replaced.

This prevents a failure case of the JSON.parse() for Traefik substitution that would fail if you have accidentally added whitespace around your environment variable in Docker/Kubernetes (same for accidental quotes).

Closes discussion https://github.com/gethomepage/homepage/discussions/3535

Note that this might be a regression for those that rely on quotes or whitespace being the first or last character of an API key.

Type of change

Checklist:

shamoon commented 3 months ago

Thanks but as you mentioned this may be a regression for others so this PR is not really acceptable. You’re also the only person to comment on the discussion so hard to know if others are affected by / care about this.

If there is interest (ie a feature request) in implementing stripping of whitespace that would probably be ok

christiaangoossens commented 3 months ago

I am sad to hear your response as I feel this fixes a bug in the original implementation, but someone else is welcome to pitch it again. I have left instructions in the discussion on how to deal with it in the meantime.

github-actions[bot] commented 2 months ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.