Skip to content

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

Description

@jagger

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requestneed interestUse :+1: to show support for the feature being addedsecret templatesEndpoint tag SecretTemplates

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions