Skip to content

Support legacy EMAIL env var as deprecated fallback for GDPR_EMAIL#781

Merged
sstidl merged 3 commits intomasterfrom
copilot/fix-privacy-policy-email
Apr 12, 2026
Merged

Support legacy EMAIL env var as deprecated fallback for GDPR_EMAIL#781
sstidl merged 3 commits intomasterfrom
copilot/fix-privacy-policy-email

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

The EMAIL env var from v5 was renamed to GDPR_EMAIL in v6 with no backward compatibility, causing users who set -e EMAIL=a@b.com in Docker to silently get the placeholder text in the privacy policy instead of their email.

Changes

  • docker/entrypoint.sh: If GDPR_EMAIL is unset but EMAIL is present, use EMAIL and emit a deprecation warning:
    if [ -z "$GDPR_EMAIL" ] && [ ! -z "$EMAIL" ]; then
      echo "WARNING: EMAIL env var is deprecated, please use GDPR_EMAIL instead"
      GDPR_EMAIL="$EMAIL"
    fi
  • doc_docker.md: Updated GDPR_EMAIL entry to document that EMAIL is still accepted as a deprecated fallback and users should migrate.

Copilot AI linked an issue Apr 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix missing developer email address in privacy policy Support legacy EMAIL env var as deprecated fallback for GDPR_EMAIL Apr 12, 2026
Copilot AI requested a review from sstidl April 12, 2026 21:02
@sstidl sstidl marked this pull request as ready for review April 12, 2026 21:03
@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Support legacy EMAIL env var as GDPR_EMAIL fallback

🐞 Bug fix ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Support legacy EMAIL env var as deprecated fallback for GDPR_EMAIL
• Emit deprecation warning when EMAIL is used instead of GDPR_EMAIL
• Update documentation to guide users toward GDPR_EMAIL migration
• Maintain backward compatibility for v5 to v6 upgrade path
Diagram
flowchart LR
  A["EMAIL env var set"] -->|"GDPR_EMAIL unset"| B["Use EMAIL value"]
  B --> C["Emit deprecation warning"]
  C --> D["Set GDPR_EMAIL"]
  D --> E["Replace privacy policy placeholder"]
  F["GDPR_EMAIL env var set"] -->|"Direct usage"| E
Loading

Grey Divider

File Changes

1. docker/entrypoint.sh 🐞 Bug fix +6/-0

Add EMAIL env var fallback with deprecation warning

• Added fallback logic to check if GDPR_EMAIL is unset but EMAIL is present
• When legacy EMAIL is detected, emit deprecation warning and assign to GDPR_EMAIL
• Ensures backward compatibility for users upgrading from v5 to v6

docker/entrypoint.sh


2. doc_docker.md 📝 Documentation +1/-1

Document EMAIL deprecation and migration path

• Updated GDPR_EMAIL documentation entry to mention EMAIL as deprecated fallback
• Added migration guidance directing users to use GDPR_EMAIL instead
• Clarifies that old EMAIL variable is still accepted for backward compatibility

doc_docker.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects bot commented Apr 12, 2026

Code Review by Qodo

🐞 Bugs (1)   📘 Rule violations (0)   📎 Requirement gaps (0)   🖥 UI issues (0)   🎨 UX Issues (0)
🐞\ ◔ Observability (1)

Grey Divider


Remediation recommended

1. Misleading GDPR_EMAIL log 🐞
Description
docker/entrypoint.sh prints GDPR_EMAIL before applying the new EMAILGDPR_EMAIL fallback, so
users setting only EMAIL will see an empty GDPR_EMAIL in logs even though the placeholder
replacement will use the fallback value. This creates contradictory logs that hinder debugging and
migration verification.
Code

docker/entrypoint.sh[R88-92]

+  # Support legacy EMAIL env var as fallback for GDPR_EMAIL
+  if [ -z "$GDPR_EMAIL" ] && [ ! -z "$EMAIL" ]; then
+    echo "WARNING: EMAIL env var is deprecated, please use GDPR_EMAIL instead"
+    GDPR_EMAIL="$EMAIL"
+  fi
Evidence
The script echoes GDPR_EMAIL near startup, but the fallback assignment (GDPR_EMAIL="$EMAIL") is
executed later inside the frontend/dual/standalone block; therefore the startup log line can be
stale when only EMAIL is set, while the later HTML replacement will use the updated value.

docker/entrypoint.sh[3-13]
docker/entrypoint.sh[88-104]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`GDPR_EMAIL` is logged before the new legacy fallback (`EMAIL` -> `GDPR_EMAIL`) is applied, leading to misleading startup logs when only `EMAIL` is set.
### Issue Context
The fallback is implemented inside the `MODE in (frontend|dual|standalone)` block, but the script prints `GDPR_EMAIL` at the beginning of execution.
### Fix Focus Areas
- docker/entrypoint.sh[3-13]
- docker/entrypoint.sh[88-104]
### Suggested change
Apply the fallback (and optionally the deprecation warning) *before* the initial `echo "GDPR_EMAIL: ..."`, or re-echo the resolved value after the fallback assignment.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

2. Deprecation warning on stdout🐞
Description
The new deprecation warning for legacy EMAIL is printed to stdout instead of stderr, unlike other
warnings in the same entrypoint script. This makes warnings harder to separate from normal output in
log pipelines.
Code

docker/entrypoint.sh[90]

+    echo "WARNING: EMAIL env var is deprecated, please use GDPR_EMAIL instead"
Evidence
The added echo "WARNING: ..." line does not redirect to stderr, while other warnings in
entrypoint.sh explicitly use >&2, indicating an inconsistency in how warnings are emitted.

docker/entrypoint.sh[88-92]
docker/entrypoint.sh[147-153]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The legacy `EMAIL` deprecation warning is printed to stdout; warnings elsewhere in the script use stderr.
### Issue Context
Inconsistent warning streams can break log routing/filters that treat stdout as normal output and stderr as warnings/errors.
### Fix Focus Areas
- docker/entrypoint.sh[88-92]
### Suggested change
Change:

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@sstidl sstidl merged commit d2b9c72 into master Apr 12, 2026
@sstidl sstidl deleted the copilot/fix-privacy-policy-email branch April 12, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Privacy policy misses developer mail address

3 participants