Skip to content

Commit a034202

Browse files
committed
fix(webapp): disable browser autofill on environment variable inputs
The environment variable key and value inputs (create + edit) did not set an autocomplete attribute, so browsers could offer to autofill or save entered values as saved credentials. Set autoComplete="off" on those inputs, matching the convention already used on the other credential-name inputs in the app.
1 parent c5c2ea9 commit a034202

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

  • .server-changes
  • apps/webapp/app/routes
    • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new
    • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: improvement
4+
---
5+
6+
Stop the browser offering to autofill or save environment variable values as saved credentials.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new/route.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ function VariableField({
677677
onChange={(e) => onChange({ ...value, key: e.currentTarget.value })}
678678
autoFocus={index === 0}
679679
onPaste={onPaste}
680+
autoComplete="off"
680681
/>
681682
<FormError id={fields.key.errorId}>{fields.key.errors}</FormError>
682683
</div>
@@ -689,6 +690,7 @@ function VariableField({
689690
placeholder="Not set"
690691
value={value.value}
691692
onChange={(e) => onChange({ ...value, value: e.currentTarget.value })}
693+
autoComplete="off"
692694
/>
693695
<FormError id={fields.value.errorId}>{fields.value.errors}</FormError>
694696
</div>

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ function EditEnvironmentVariablePanel({
865865
placeholder={variable.isSecret ? "Set new secret value" : "Not set"}
866866
defaultValue={variable.value}
867867
type={"text"}
868+
autoComplete="off"
868869
/>
869870
<FormError id={value.errorId}>{value.errors}</FormError>
870871
</InputGroup>

0 commit comments

Comments
 (0)