Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automating Password Entry #5

Closed
nakabonne opened this issue Nov 29, 2020 · 0 comments · Fixed by #12
Closed

Automating Password Entry #5

nakabonne opened this issue Nov 29, 2020 · 0 comments · Fixed by #12
Labels
enhancement New feature or request

Comments

@nakabonne
Copy link
Owner

It's a bit of a hassle to set the password every time; hence it would be nice to set it in an environment variable beforehand.

PBGOPY_PASSWORD_FILE=/home/foo/.config/pbgopy/pass.txt
@nakabonne nakabonne added the enhancement New feature or request label Nov 29, 2020
keyslapperdev pushed a commit to keyslapperdev/pbgopy that referenced this issue Dec 2, 2020
In commands/copy.go
  Created new function getPasswordFromEnv to work as a fallback
   password if the -p flag is not set. Important to note, the -p
   flag takes priority over the env var, as it should.
  Updated logic to check password length before using it to encrypt

In commands/env.go
  Added new env const:
   const pbgopyPasswordFileEnv = "PBGOPY_PASSWORD_FILE"

In commands/paste.go
  Updated logic to check password length before using it to decrypt
keyslapperdev added a commit to keyslapperdev/pbgopy that referenced this issue Dec 7, 2020
In commands/copy.go
  Updated variable name 'fileLoc to filepath'
  Updated comparison from pass len to pass value

In commands/paste.go
  Updated comparison from pass len to pass value
nakabonne added a commit that referenced this issue Dec 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant