Skip to content

(Feature) Configurable allow/deny search indexing via robots.txt #221

@l3pr-org

Description

@l3pr-org

Summary

It may be advantageous to, by default, disable search indexing of the OneTimeSecrets web application. Currently, Google (and others) are indexing the site, potentially making it very easy for an attacker to collect a list of instances. I propose that search indexing be opt-in-- the default behavior of this configuration option should be to completely disallow indexing in order to create more privacy-respecting defaults.

Examples

Searches that could be used to find instances:

https://www.google.com/search?q=%22Powered+by+OTS+v1.17.3-2-g046bc25%22

Image

and

https://www.google.com/search?q=%22Create+the+secret%21%22+%2B+%22Powered+by+OTS%22

Image

I have redacted these screenshots to retain administrator privacy if they choose to have their result(s) removed from popular search engines, however, if you wish to check-- just click on one of the provided Google queries.

Solution

A simple robots.txt to completely disallow indexing would look like:

User-agent:*
Disallow: /

After some testing, simply adding robots.txt with the above content to /frontend in this repo will work. See below screenshots.

Image Image

Like I mentioned earlier, it would be even better if this feature was opt-in. I notice that configuration options are handled in /pkg/customization/customize.go, and I assume something like this would work.

...
		DisableQRSupport     bool   `json:"disableQRSupport,omitempty" yaml:"disableQRSupport"`
		DisableSearchIndex   bool   `json:"disable-search-index" yaml:"disableSearchIndex" default:"true"`
		DisableThemeSwitcher bool   `json:"disableThemeSwitcher,omitempty" yaml:"disableThemeSwitcher"`
...

Opening a PR and moving the rest of this there now that I've fleshed out the idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions