Open albanbruder opened 3 years ago
I am uneasy about this.
Allowing users to load images from third party servers would allow that third party (which could be the election administrator) to record IP addresses of visitors. This remark may be irrelevant in your case since you set up your own server and you may restrict who can act as an election administrator, but it is not the case of our public instance which, at the moment, and to the best of my knowledge, does not expose IP addresses of visitors. I am also wondering what would be the interaction with our own data privacy policy.
We could put images directly into the election.json, you could say. To that, I'll object that, on our own instance, we definitely do not want people to put arbitrary images on what looks like our website. But adding the feature as optional might be worth considering.
I see your point.
That is exactly why we did not include the images directly (in the browser), but rather used a proxy to protect the IP address of the visitor. One could even cache the images after the election was opened so that the fingerprints can be verified during the election.
I guess another option would be to allow the election administrator to select the logos from a set of pictures (defined by the server administrator). In such a case organizations hosting their own Belenios instance could upload their logos and wouldn't have to worry about malicious content.
A note on this: I tried replacing the logo file by a custom logo in my local build. Of course my logo differs in width and height from the official one, so I didn't expect it to look perfect...
But I was suprised to see the logo displayed in different sizes on different pages, due to different styling. Maybe there's a way to factor out a header template shared by all web pages.
Technically, there are indeed several HTML templates (in 1.20):
I've recently removed (1) and started using (2) everywhere in server-generated pages. I think (3) will probably stay until the old booth is removed altogether. (4) uses different technology and will probably stay there for a long time (most likely until it is removed in favor of a booth v3).
Concerning the original request: it occurred to me that setting the logo for a whole instance could be done simply at the reverse proxy level (when one is used), with no changes to Belenios itself. @albanbruder Maybe this is enough for your use case?
For branding purposes it would be nice to have the option to change the logos displayed in the booth (left and right).
Example:
Currently we are use a kind of hacky solution to ahive this: We define custom properties in the election description using JSON
and than replace the default logos using a view lines of JavaScript.
One example for a native solution:
Thanks for the great work!