Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CUSTOM_HEADER_IMAGE legacy code #5347

Closed
eloquence opened this issue Jun 27, 2020 · 2 comments · Fixed by #5394
Closed

Remove CUSTOM_HEADER_IMAGE legacy code #5347

eloquence opened this issue Jun 27, 2020 · 2 comments · Fixed by #5394
Labels
needs/discussion queued up for discussion at future team meeting. Use judiciously.

Comments

@eloquence
Copy link
Member

eloquence commented Jun 27, 2020

I encountered a couple of old logo versions in securedrop/static/i: securedrop.png and securedrop_small.png. The latter file is in fact still in use in the journalist and source UI templates, but only if CUSTOM_HEADER_IMAGE is set. What's CUSTOM_HEADER_IMAGE you ask? It's neither configurable via sdconfig nor found in config.py.

Turns out this is an old "theming option" in early versions of SecureDrop. It looks like any explanation of what it is intended to do was dropped in 5aa8a44 and it's now just being quietly passed into the template. This looks to me like legacy code that can be safely removed.

@eloquence eloquence added the needs/discussion queued up for discussion at future team meeting. Use judiciously. label Jun 27, 2020
@eloquence
Copy link
Member Author

I also don't see any way this legacy functionality could possibly work in current develop, since references to the header_image variable itself were removed from the template in #3057. It looks like this was the first iteration of "custom logo" functionality, and it'd dump a "Powered by SecureDrop" below the custom logo iff it was configured.

@eloquence
Copy link
Member Author

eloquence commented Jul 20, 2020

I am seeing reference to the old custom header image logic in https://github.com/freedomofpress/securedrop/blob/develop/install_files/ansible-base/roles/backup/files/0.3_collect.py which looks like an older version of backup.py (not called or accessed from anywhere) that can be safely removed now, so doing so as part of the same PR.

eloquence added a commit that referenced this issue Jul 21, 2020
- Removes old, unreachable "custom header image" logic which was
  replaced with custom logo upload feature
- Remove old, 0.3 era backup script and backup variable from staging.yml
- Remove old logo images and AppArmor whitelisting rules for them

Resolves #5347
eloquence added a commit that referenced this issue Jul 30, 2020
- Removes old, unreachable "custom header image" logic which was
  replaced with custom logo upload feature
- Remove old, 0.3 era backup script and backup variable from staging.yml
- Remove old logo images and AppArmor whitelisting rules for them

Resolves #5347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/discussion queued up for discussion at future team meeting. Use judiciously.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant