Skip to content

DeriveKey() function uses undeclared variable "Salt" #47

@maxweisspoker

Description

@maxweisspoker

From the looks of it, the data variable passed into the first argument for EncryptBytes() and DecryptBytes() in encryption.go is in fact the passphrase, and the second argument "passphrase" is intended to be the Salt. That is confusing enough, but the DeriveKey() function is outright broken because it wants to use "Salt" which is not defined.

I have a PR which defines Salt in the "portwarden" namespace as the env var Salt, although I don't know if that's really how you want that function to work. Regardless, defining Salt as such clears away the errors and allows the program to compile.

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