diff --git a/http_index.go b/http_index.go index 7bd7d392..7b4328b0 100644 --- a/http_index.go +++ b/http_index.go @@ -78,11 +78,17 @@ func (h *HTTP) privacy(w http.ResponseWriter, r *http.Request) { type Data struct { ds.Common + CookiesInUse bool Bin ds.Bin `json:"bin"` } + var data Data data.Page = "privacy" + if h.config.RequireCookie == true { + data.CookiesInUse = true + } + if err := h.templates.ExecuteTemplate(w, "privacy", data); err != nil { fmt.Printf("Failed to execute template: %s\n", err.Error()) http.Error(w, "Errno 302", http.StatusInternalServerError) diff --git a/templates/privacy.html b/templates/privacy.html index 0ed41f61..b100e650 100644 --- a/templates/privacy.html +++ b/templates/privacy.html @@ -24,6 +24,10 @@
Meta data about transactions, including the IP address of clients uploading and downloading files, is logged for abuse handling purposes and may be shared with third parties in this context.
This service is using HTTPS to secure data in transit. This mechanism provide data protection from a limited set of scenarios such as man-in-the-middle attacks. The content is, however, not encrypted on the server side. It is recommended that the client encrypts the content prior to uploading it.
+ + {{ if .CookiesInUse }} +A cookie named verified
is stored in the client's browser to signal to Filebin if the user has acknowledged the risk involved in downloading files from this service.