Skip to content

Commit ef18b5d

Browse files
authored
feat(ui): prevent password manager interference & improve service links (#3989)
1 parent 3242251 commit ef18b5d

File tree

10 files changed

+95
-16
lines changed

10 files changed

+95
-16
lines changed

src/components/Common/SensitiveInput/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ const SensitiveInput = ({ as = 'input', ...props }: SensitiveInputProps) => {
2525
return (
2626
<>
2727
<Component
28+
autoComplete="off"
29+
data-1pignore="true"
30+
data-lpignore="true"
31+
data-bwignore="true"
2832
{...componentProps}
2933
className={`rounded-l-only ${componentProps.className ?? ''}`}
3034
type={

src/components/Login/LocalLogin.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ const LocalLogin = ({ revalidate }: LocalLoginProps) => {
101101
type="password"
102102
autoComplete="current-password"
103103
data-testid="password"
104+
data-1pignore="false"
105+
data-lpignore="false"
106+
data-bwignore="false"
104107
/>
105108
</div>
106109
{errors.password &&

src/components/Settings/Notifications/NotificationsDiscord.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ const NotificationsDiscord = () => {
208208
name="botUsername"
209209
type="text"
210210
placeholder={settings.currentSettings.applicationTitle}
211+
autoComplete="off"
212+
data-1pignore="true"
213+
data-lpignore="true"
214+
data-bwignore="true"
211215
/>
212216
</div>
213217
{errors.botUsername &&

src/components/Settings/Notifications/NotificationsEmail.tsx

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const NotificationsEmail = () => {
103103
otherwise: Yup.string().nullable(),
104104
})
105105
.matches(
106-
/-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/s,
106+
/-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/,
107107
intl.formatMessage(messages.validationPgpPrivateKey)
108108
),
109109
pgpPassword: Yup.string().when('pgpPrivateKey', {
@@ -263,6 +263,10 @@ const NotificationsEmail = () => {
263263
name="emailFrom"
264264
type="text"
265265
inputMode="email"
266+
autoComplete="off"
267+
data-1pignore="true"
268+
data-lpignore="true"
269+
data-bwignore="true"
266270
/>
267271
</div>
268272
{errors.emailFrom &&
@@ -284,6 +288,10 @@ const NotificationsEmail = () => {
284288
name="smtpHost"
285289
type="text"
286290
inputMode="url"
291+
autoComplete="off"
292+
data-1pignore="true"
293+
data-lpignore="true"
294+
data-bwignore="true"
287295
/>
288296
</div>
289297
{errors.smtpHost &&
@@ -305,6 +313,10 @@ const NotificationsEmail = () => {
305313
type="text"
306314
inputMode="numeric"
307315
className="short"
316+
autoComplete="off"
317+
data-1pignore="true"
318+
data-lpignore="true"
319+
data-bwignore="true"
308320
/>
309321
{errors.smtpPort &&
310322
touched.smtpPort &&
@@ -358,7 +370,15 @@ const NotificationsEmail = () => {
358370
</label>
359371
<div className="form-input-area">
360372
<div className="form-input-field">
361-
<Field id="authUser" name="authUser" type="text" />
373+
<Field
374+
id="authUser"
375+
name="authUser"
376+
type="text"
377+
autoComplete="off"
378+
data-1pignore="true"
379+
data-lpignore="true"
380+
data-bwignore="true"
381+
/>
362382
</div>
363383
</div>
364384
</div>
@@ -368,12 +388,7 @@ const NotificationsEmail = () => {
368388
</label>
369389
<div className="form-input-area">
370390
<div className="form-input-field">
371-
<SensitiveInput
372-
as="field"
373-
id="authPass"
374-
name="authPass"
375-
autoComplete="one-time-code"
376-
/>
391+
<SensitiveInput as="field" id="authPass" name="authPass" />
377392
</div>
378393
</div>
379394
</div>
@@ -398,6 +413,10 @@ const NotificationsEmail = () => {
398413
type="textarea"
399414
rows="10"
400415
className="font-mono text-xs"
416+
autoComplete="off"
417+
data-1pignore="true"
418+
data-lpignore="true"
419+
data-bwignore="true"
401420
/>
402421
</div>
403422
{errors.pgpPrivateKey &&
@@ -425,7 +444,10 @@ const NotificationsEmail = () => {
425444
as="field"
426445
id="pgpPassword"
427446
name="pgpPassword"
428-
autoComplete="one-time-code"
447+
autoComplete="off"
448+
data-1pignore="true"
449+
data-lpignore="true"
450+
data-bwignore="true"
429451
/>
430452
</div>
431453
{errors.pgpPassword &&

src/components/Settings/Notifications/NotificationsTelegram.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ const NotificationsTelegram = () => {
211211
as="field"
212212
id="botAPI"
213213
name="botAPI"
214-
autoComplete="one-time-code"
214+
type="text"
215215
/>
216216
</div>
217217
{errors.botAPI &&
@@ -230,7 +230,15 @@ const NotificationsTelegram = () => {
230230
</label>
231231
<div className="form-input-area">
232232
<div className="form-input-field">
233-
<Field id="botUsername" name="botUsername" type="text" />
233+
<Field
234+
id="botUsername"
235+
name="botUsername"
236+
type="text"
237+
autoComplete="off"
238+
data-1pignore="true"
239+
data-lpignore="true"
240+
data-bwignore="true"
241+
/>
234242
</div>
235243
{errors.botUsername &&
236244
touched.botUsername &&
@@ -260,7 +268,15 @@ const NotificationsTelegram = () => {
260268
</label>
261269
<div className="form-input-area">
262270
<div className="form-input-field">
263-
<Field id="chatId" name="chatId" type="text" />
271+
<Field
272+
id="chatId"
273+
name="chatId"
274+
type="text"
275+
autoComplete="off"
276+
data-1pignore="true"
277+
data-lpignore="true"
278+
data-bwignore="true"
279+
/>
264280
</div>
265281
{errors.chatId &&
266282
touched.chatId &&

src/components/Settings/RadarrModal/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ const RadarrModal = ({ onClose, radarr, onSave }: RadarrModalProps) => {
377377
id="name"
378378
name="name"
379379
type="text"
380+
autoComplete="off"
381+
data-1pignore="true"
382+
data-lpignore="true"
383+
data-bwignore="true"
380384
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
381385
setIsValidated(false);
382386
setFieldValue('name', e.target.value);
@@ -470,7 +474,6 @@ const RadarrModal = ({ onClose, radarr, onSave }: RadarrModalProps) => {
470474
as="field"
471475
id="apiKey"
472476
name="apiKey"
473-
autoComplete="one-time-code"
474477
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
475478
setIsValidated(false);
476479
setFieldValue('apiKey', e.target.value);

src/components/Settings/SettingsPlex.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,10 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
824824
id="tautulliPort"
825825
name="tautulliPort"
826826
className="short"
827+
autoComplete="off"
828+
data-1pignore="true"
829+
data-lpignore="true"
830+
data-bwignore="true"
827831
/>
828832
{errors.tautulliPort &&
829833
touched.tautulliPort &&
@@ -861,6 +865,10 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
861865
inputMode="url"
862866
id="tautulliUrlBase"
863867
name="tautulliUrlBase"
868+
autoComplete="off"
869+
data-1pignore="true"
870+
data-lpignore="true"
871+
data-bwignore="true"
864872
/>
865873
</div>
866874
{errors.tautulliUrlBase &&
@@ -881,7 +889,6 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
881889
as="field"
882890
id="tautulliApiKey"
883891
name="tautulliApiKey"
884-
autoComplete="one-time-code"
885892
/>
886893
</div>
887894
{errors.tautulliApiKey &&
@@ -902,6 +909,10 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
902909
inputMode="url"
903910
id="tautulliExternalUrl"
904911
name="tautulliExternalUrl"
912+
autoComplete="off"
913+
data-1pignore="true"
914+
data-lpignore="true"
915+
data-bwignore="true"
905916
/>
906917
</div>
907918
{errors.tautulliExternalUrl &&

src/components/Settings/SettingsServices.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ const ServerInstance = ({
8484
<h3 className="truncate font-medium leading-5 text-white">
8585
<a
8686
href={serviceUrl}
87+
target="_blank"
88+
rel="noopener noreferrer"
8789
className="transition duration-300 hover:text-white hover:underline"
8890
>
8991
{name}
@@ -112,6 +114,8 @@ const ServerInstance = ({
112114
</span>
113115
<a
114116
href={internalUrl}
117+
target="_blank"
118+
rel="noopener noreferrer"
115119
className="transition duration-300 hover:text-white hover:underline"
116120
>
117121
{internalUrl}
@@ -124,7 +128,12 @@ const ServerInstance = ({
124128
{profileName}
125129
</p>
126130
</div>
127-
<a href={serviceUrl} className="opacity-50 hover:opacity-100">
131+
<a
132+
href={serviceUrl}
133+
target="_blank"
134+
rel="noopener noreferrer"
135+
className="opacity-50 hover:opacity-100"
136+
>
128137
{isSonarr ? (
129138
<SonarrLogo className="h-10 w-10 flex-shrink-0" />
130139
) : (

src/components/Settings/SonarrModal/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
412412
id="name"
413413
name="name"
414414
type="text"
415+
autoComplete="off"
416+
data-1pignore="true"
417+
data-lpignore="true"
418+
data-bwignore="true"
415419
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
416420
setIsValidated(false);
417421
setFieldValue('name', e.target.value);
@@ -505,7 +509,6 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
505509
as="field"
506510
id="apiKey"
507511
name="apiKey"
508-
autoComplete="one-time-code"
509512
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
510513
setIsValidated(false);
511514
setFieldValue('apiKey', e.target.value);

src/components/UserList/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,10 @@ const UserList = () => {
372372
name="email"
373373
type="text"
374374
inputMode="email"
375+
autoComplete="off"
376+
data-1pignore="true"
377+
data-lpignore="true"
378+
data-bwignore="true"
375379
/>
376380
</div>
377381
{errors.email &&

0 commit comments

Comments
 (0)