From ef18b5d1de0bf2fe13975c3f488d90299fc717fe Mon Sep 17 00:00:00 2001
From: soup
Date: Tue, 25 Feb 2025 09:17:36 +0100
Subject: [PATCH] feat(ui): prevent password manager interference & improve
service links (#3989)
---
.../Common/SensitiveInput/index.tsx | 4 ++
src/components/Login/LocalLogin.tsx | 3 ++
.../Notifications/NotificationsDiscord.tsx | 4 ++
.../Notifications/NotificationsEmail.tsx | 40 ++++++++++++++-----
.../Notifications/NotificationsTelegram.tsx | 22 ++++++++--
src/components/Settings/RadarrModal/index.tsx | 5 ++-
src/components/Settings/SettingsPlex.tsx | 13 +++++-
src/components/Settings/SettingsServices.tsx | 11 ++++-
src/components/Settings/SonarrModal/index.tsx | 5 ++-
src/components/UserList/index.tsx | 4 ++
10 files changed, 95 insertions(+), 16 deletions(-)
diff --git a/src/components/Common/SensitiveInput/index.tsx b/src/components/Common/SensitiveInput/index.tsx
index ae11b951..9a92d254 100644
--- a/src/components/Common/SensitiveInput/index.tsx
+++ b/src/components/Common/SensitiveInput/index.tsx
@@ -25,6 +25,10 @@ const SensitiveInput = ({ as = 'input', ...props }: SensitiveInputProps) => {
return (
<>
{
type="password"
autoComplete="current-password"
data-testid="password"
+ data-1pignore="false"
+ data-lpignore="false"
+ data-bwignore="false"
/>
{errors.password &&
diff --git a/src/components/Settings/Notifications/NotificationsDiscord.tsx b/src/components/Settings/Notifications/NotificationsDiscord.tsx
index 421e76e5..71ecdccb 100644
--- a/src/components/Settings/Notifications/NotificationsDiscord.tsx
+++ b/src/components/Settings/Notifications/NotificationsDiscord.tsx
@@ -208,6 +208,10 @@ const NotificationsDiscord = () => {
name="botUsername"
type="text"
placeholder={settings.currentSettings.applicationTitle}
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.botUsername &&
diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx
index 46d10d6c..38d0ee2e 100644
--- a/src/components/Settings/Notifications/NotificationsEmail.tsx
+++ b/src/components/Settings/Notifications/NotificationsEmail.tsx
@@ -103,7 +103,7 @@ const NotificationsEmail = () => {
otherwise: Yup.string().nullable(),
})
.matches(
- /-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/s,
+ /-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/,
intl.formatMessage(messages.validationPgpPrivateKey)
),
pgpPassword: Yup.string().when('pgpPrivateKey', {
@@ -263,6 +263,10 @@ const NotificationsEmail = () => {
name="emailFrom"
type="text"
inputMode="email"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.emailFrom &&
@@ -284,6 +288,10 @@ const NotificationsEmail = () => {
name="smtpHost"
type="text"
inputMode="url"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.smtpHost &&
@@ -305,6 +313,10 @@ const NotificationsEmail = () => {
type="text"
inputMode="numeric"
className="short"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.smtpPort &&
touched.smtpPort &&
@@ -358,7 +370,15 @@ const NotificationsEmail = () => {
@@ -368,12 +388,7 @@ const NotificationsEmail = () => {
@@ -398,6 +413,10 @@ const NotificationsEmail = () => {
type="textarea"
rows="10"
className="font-mono text-xs"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.pgpPrivateKey &&
@@ -425,7 +444,10 @@ const NotificationsEmail = () => {
as="field"
id="pgpPassword"
name="pgpPassword"
- autoComplete="one-time-code"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.pgpPassword &&
diff --git a/src/components/Settings/Notifications/NotificationsTelegram.tsx b/src/components/Settings/Notifications/NotificationsTelegram.tsx
index 690731e6..292051ca 100644
--- a/src/components/Settings/Notifications/NotificationsTelegram.tsx
+++ b/src/components/Settings/Notifications/NotificationsTelegram.tsx
@@ -211,7 +211,7 @@ const NotificationsTelegram = () => {
as="field"
id="botAPI"
name="botAPI"
- autoComplete="one-time-code"
+ type="text"
/>
{errors.botAPI &&
@@ -230,7 +230,15 @@ const NotificationsTelegram = () => {
-
+
{errors.botUsername &&
touched.botUsername &&
@@ -260,7 +268,15 @@ const NotificationsTelegram = () => {
-
+
{errors.chatId &&
touched.chatId &&
diff --git a/src/components/Settings/RadarrModal/index.tsx b/src/components/Settings/RadarrModal/index.tsx
index 4ebc7a8b..c4fb546a 100644
--- a/src/components/Settings/RadarrModal/index.tsx
+++ b/src/components/Settings/RadarrModal/index.tsx
@@ -377,6 +377,10 @@ const RadarrModal = ({ onClose, radarr, onSave }: RadarrModalProps) => {
id="name"
name="name"
type="text"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
onChange={(e: React.ChangeEvent
) => {
setIsValidated(false);
setFieldValue('name', e.target.value);
@@ -470,7 +474,6 @@ const RadarrModal = ({ onClose, radarr, onSave }: RadarrModalProps) => {
as="field"
id="apiKey"
name="apiKey"
- autoComplete="one-time-code"
onChange={(e: React.ChangeEvent) => {
setIsValidated(false);
setFieldValue('apiKey', e.target.value);
diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx
index 1414f017..9f5420c3 100644
--- a/src/components/Settings/SettingsPlex.tsx
+++ b/src/components/Settings/SettingsPlex.tsx
@@ -824,6 +824,10 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
id="tautulliPort"
name="tautulliPort"
className="short"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.tautulliPort &&
touched.tautulliPort &&
@@ -861,6 +865,10 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
inputMode="url"
id="tautulliUrlBase"
name="tautulliUrlBase"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.tautulliUrlBase &&
@@ -881,7 +889,6 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
as="field"
id="tautulliApiKey"
name="tautulliApiKey"
- autoComplete="one-time-code"
/>
{errors.tautulliApiKey &&
@@ -902,6 +909,10 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
inputMode="url"
id="tautulliExternalUrl"
name="tautulliExternalUrl"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.tautulliExternalUrl &&
diff --git a/src/components/Settings/SettingsServices.tsx b/src/components/Settings/SettingsServices.tsx
index 92810749..c7b1c3d2 100644
--- a/src/components/Settings/SettingsServices.tsx
+++ b/src/components/Settings/SettingsServices.tsx
@@ -84,6 +84,8 @@ const ServerInstance = ({
-
+
{isSonarr ? (
) : (
diff --git a/src/components/Settings/SonarrModal/index.tsx b/src/components/Settings/SonarrModal/index.tsx
index 729a40a7..68c85366 100644
--- a/src/components/Settings/SonarrModal/index.tsx
+++ b/src/components/Settings/SonarrModal/index.tsx
@@ -412,6 +412,10 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
id="name"
name="name"
type="text"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
onChange={(e: React.ChangeEvent) => {
setIsValidated(false);
setFieldValue('name', e.target.value);
@@ -505,7 +509,6 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
as="field"
id="apiKey"
name="apiKey"
- autoComplete="one-time-code"
onChange={(e: React.ChangeEvent) => {
setIsValidated(false);
setFieldValue('apiKey', e.target.value);
diff --git a/src/components/UserList/index.tsx b/src/components/UserList/index.tsx
index b37751f4..5aec7b3d 100644
--- a/src/components/UserList/index.tsx
+++ b/src/components/UserList/index.tsx
@@ -372,6 +372,10 @@ const UserList = () => {
name="email"
type="text"
inputMode="email"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.email &&