Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
https://stirlingpdf.com
MIT License
46.85k stars 3.83k forks source link

[Bug]: Terms and conditions URL hard-coded in settings.yml #2112

Open colfes opened 1 month ago

colfes commented 1 month ago

Installation Method

None

The Problem

The settings.yml contains this line:

legal: Automatically Generated Settings (Do Not Edit Directly) termsAndConditions: https://www.stirlingpdf.com/terms-and-conditions # URL to the terms and conditions of your application (e.g. https://example.com/terms) Empty string to disable or filename to load from local file in static folder

When using through docker, this leads to the Terms and Conditions button being shown (and linking to stirlingpdfs' T&C), even though this should not be the case.

Even when setting LEGAL_TERMSANDCONDITONS: "" in the compose file, the link will not disappear.

Behaviour should be similar to privacyPolicy / Impressum etc, where there is '' in the settings.yml

Version of Stirling-PDF

latest

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

Start page

Docker Configuration

No response

Relevant Log Output

No response

Additional Information

No response

Browsers Affected

No response

No Duplicate of the Issue

dosubot[bot] commented 1 month ago

Hey @colfes! 👋 I'm here to help you with any bugs, questions, or contributions you have for Stirling-PDF. Let's squash those bugs together!

To address the issue of the Terms and Conditions button appearing even when the LEGAL_TERMSANDCONDITIONS setting is set to an empty string, you should ensure that the termsAndConditions field in the settings.yml file is indeed set to an empty string. However, the current behavior defaults to "https://www.stirlingpdf.com/terms-and-conditions" if the field is empty, as specified in the InitialSetup.java file [1].

To resolve this, you may need to modify the InitialSetup class to prevent it from setting a default URL when the termsAndConditions field is empty. This change will ensure that the button does not appear if the field is left empty in the settings.yml file [2].

To continue talking to Dosu, mention @dosu.

ilacftemp commented 3 weeks ago

Hey, can I work on this issue?

ilacftemp commented 3 weeks ago

Sorry, I accidentally created a PR for this issue ahead of time 😅 but I already closed it and plan on waiting for this issue to be assigned to me before reopening it.

Frooodle commented 3 weeks ago

Sorry, I accidentally created a PR for this issue ahead of time 😅 but I already closed it and plan on waiting for this issue to be assigned to me before reopening it.

Not sure if this PR is a true fix sadly