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

method ‎Template::GetField does not warn user when attempting to get nonexistent field #369

Open
jagger opened this issue Aug 18, 2023 · 0 comments
Labels
feature request New feature or request secret templates Endpoint tag SecretTemplates

Comments

@jagger
Copy link
Contributor

jagger commented Aug 18, 2023

https://github.com/thycotic-ps/thycotic.secretserver/blob/996427548cdefd482d1c0b14ec0824e7a4633e82/src/Thycotic.SecretServer/classes/secret-templates/Template.cs#L28C4-L28C4

Field slugs are case sensitive leading to confusion when attempting to retrieve values from the API. If I attempt to call getField('User-Name') and the underlying slug is user-name a blank field is returned rather than receiving an error. This is also compounded by the method referencing a field and users often assume we are using the field name rather than the slug so 'User Name' would also come back with a blank field rather than throwing an error.

We should not use a .toLower() on the values as when the field is sent back to secret server the slug will be updated by Set-TssSecretField and we should avoid making any changes (even minor) unless specifically made by the user.

@jagger jagger added feature request New feature or request secret templates Endpoint tag SecretTemplates labels Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request secret templates Endpoint tag SecretTemplates
Projects
None yet
Development

No branches or pull requests

1 participant