Skip to content

Conversation

GLobyNew
Copy link
Contributor

My first real pull request for this project.

tldr: if you create a custom .yaml with max attribute for string, for example:

---
priority: 1
name: "Bank Card"
prefix: "cards"
name_from:
  - "bankname"
welcome: "🧪 Creating Bank Card entry"
attributes:
  - name: "bankname"
    type: "string"
    prompt: "Bank Name"
    min: 1
    max: 255

It will fail check for max length all the time:

🌟 Welcome to the secret creation wizard (gopass create)!
🧪 Hint: Use 'gopass edit -c' for more control!
[ 0] Website login
[ 1] Bank Card

Please select the type of secret you would like to create (q to abort) [0]: 1
1
🧪 Creating Bank Card entry
  [1] Bank Name                              []: Test
❌ bankname is too long (at most 255)

Turns out wizard was checking v.Min value instead of v.Max
Now works as expected.
All internal tests were passed.

Signed-off-by: Ilya Eryomenko <ilya@eryomenko.com>
@dominikschulz
Copy link
Member

Oh, that's a nice find. Thank you!

@dominikschulz dominikschulz merged commit cc901b8 into gopasspw:master Feb 26, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants