-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add more secret string fields #10149
Conversation
@@ -12,6 +12,8 @@ import type { | |||
HaFormStringSchema, | |||
} from "./ha-form"; | |||
|
|||
const SECRET_FIELDS = ["password", "client_secret", "access_secret", "secret"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need client_secret
and access_secret
because we check with includes
, so secret
matches both.
const SECRET_FIELDS = ["password", "client_secret", "access_secret", "secret"]; | |
const SECRET_FIELDS = ["password", "secret"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha, no. That was the old logic but you changed it. We should change that back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, yeah
Should "token" also be checked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure. 🤷
@@ -33,7 +35,7 @@ export class HaFormString extends LitElement implements HaFormElement { | |||
} | |||
|
|||
protected render(): TemplateResult { | |||
return this.schema.name.includes("password") | |||
return SECRET_FIELDS.includes(this.schema.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old check was "name includes password", new check is "name == password". We should do the original check again.
Breaking change
Proposed change
Add "client_secret" and "access_secret" as maskable keys
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: