stash icon indicating copy to clipboard operation
stash copied to clipboard

Add anonymise database task

Open WithoutPants opened this issue 3 years ago • 0 comments

Occasionally, it is necessary to obtain a user's stash database for debugging issues. This PR provides a way for a user to share their database without leaking information they consider private.

Adds Anonymise, and Download anonymised tasks to the Tasks page - similar to the backup tasks.

Anonymise makes a copy of the database, randomising all sensitive data:

  • deletes all image blobs
  • renames all folders to be equal to their id numbers
  • renames all files to be equal to their id numbers
  • replaces fingerprint values with random hex numbers
  • replaces non-whitespace characters of the following fields with random letters:
    • scene:
      • title
      • details
      • url
      • code
      • director
    • image
      • title
    • gallery
      • title
      • details
    • performer
      • name
      • aliases
      • details
      • url
      • twitter
      • instagram
      • tattoos
      • piercings
    • studio
      • name
      • url
      • details
      • aliases
    • tag
      • name
      • description
      • aliases
    • movie
      • name
      • aliases
      • synopsis
      • url
      • director

WithoutPants avatar Nov 25 '22 00:11 WithoutPants