Skip to content
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

feat(ui): prevent password manager interference & improve service links #3989

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/Common/SensitiveInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const SensitiveInput = ({ as = 'input', ...props }: SensitiveInputProps) => {
return (
<>
<Component
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
{...componentProps}
className={`rounded-l-only ${componentProps.className ?? ''}`}
type={
Expand Down
3 changes: 3 additions & 0 deletions src/components/Login/LocalLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ const LocalLogin = ({ revalidate }: LocalLoginProps) => {
type="password"
autoComplete="current-password"
data-testid="password"
data-1pignore="false"
data-lpignore="false"
data-bwignore="false"
/>
</div>
{errors.password &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
</div>
{errors.botUsername &&
Expand Down
40 changes: 31 additions & 9 deletions src/components/Settings/Notifications/NotificationsEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -263,6 +263,10 @@ const NotificationsEmail = () => {
name="emailFrom"
type="text"
inputMode="email"
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
/>
</div>
{errors.emailFrom &&
Expand All @@ -284,6 +288,10 @@ const NotificationsEmail = () => {
name="smtpHost"
type="text"
inputMode="url"
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
/>
</div>
{errors.smtpHost &&
Expand All @@ -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 &&
Expand Down Expand Up @@ -358,7 +370,15 @@ const NotificationsEmail = () => {
</label>
<div className="form-input-area">
<div className="form-input-field">
<Field id="authUser" name="authUser" type="text" />
<Field
id="authUser"
name="authUser"
type="text"
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
/>
</div>
</div>
</div>
Expand All @@ -368,12 +388,7 @@ const NotificationsEmail = () => {
</label>
<div className="form-input-area">
<div className="form-input-field">
<SensitiveInput
as="field"
id="authPass"
name="authPass"
autoComplete="one-time-code"
/>
<SensitiveInput as="field" id="authPass" name="authPass" />
</div>
</div>
</div>
Expand All @@ -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"
/>
</div>
{errors.pgpPrivateKey &&
Expand Down Expand Up @@ -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"
/>
</div>
{errors.pgpPassword &&
Expand Down
22 changes: 19 additions & 3 deletions src/components/Settings/Notifications/NotificationsTelegram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const NotificationsTelegram = () => {
as="field"
id="botAPI"
name="botAPI"
autoComplete="one-time-code"
type="text"
/>
</div>
{errors.botAPI &&
Expand All @@ -230,7 +230,15 @@ const NotificationsTelegram = () => {
</label>
<div className="form-input-area">
<div className="form-input-field">
<Field id="botUsername" name="botUsername" type="text" />
<Field
id="botUsername"
name="botUsername"
type="text"
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
/>
</div>
{errors.botUsername &&
touched.botUsername &&
Expand Down Expand Up @@ -260,7 +268,15 @@ const NotificationsTelegram = () => {
</label>
<div className="form-input-area">
<div className="form-input-field">
<Field id="chatId" name="chatId" type="text" />
<Field
id="chatId"
name="chatId"
type="text"
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
/>
</div>
{errors.chatId &&
touched.chatId &&
Expand Down
5 changes: 4 additions & 1 deletion src/components/Settings/RadarrModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLInputElement>) => {
setIsValidated(false);
setFieldValue('name', e.target.value);
Expand Down Expand Up @@ -470,7 +474,6 @@ const RadarrModal = ({ onClose, radarr, onSave }: RadarrModalProps) => {
as="field"
id="apiKey"
name="apiKey"
autoComplete="one-time-code"
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setIsValidated(false);
setFieldValue('apiKey', e.target.value);
Expand Down
13 changes: 12 additions & 1 deletion src/components/Settings/SettingsPlex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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"
/>
</div>
{errors.tautulliUrlBase &&
Expand All @@ -881,7 +889,6 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
as="field"
id="tautulliApiKey"
name="tautulliApiKey"
autoComplete="one-time-code"
/>
</div>
{errors.tautulliApiKey &&
Expand All @@ -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"
/>
</div>
{errors.tautulliExternalUrl &&
Expand Down
11 changes: 10 additions & 1 deletion src/components/Settings/SettingsServices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const ServerInstance = ({
<h3 className="truncate font-medium leading-5 text-white">
<a
href={serviceUrl}
target="_blank"
rel="noopener noreferrer"
className="transition duration-300 hover:text-white hover:underline"
>
{name}
Expand Down Expand Up @@ -112,6 +114,8 @@ const ServerInstance = ({
</span>
<a
href={internalUrl}
target="_blank"
rel="noopener noreferrer"
className="transition duration-300 hover:text-white hover:underline"
>
{internalUrl}
Expand All @@ -124,7 +128,12 @@ const ServerInstance = ({
{profileName}
</p>
</div>
<a href={serviceUrl} className="opacity-50 hover:opacity-100">
<a
href={serviceUrl}
target="_blank"
rel="noopener noreferrer"
className="opacity-50 hover:opacity-100"
>
{isSonarr ? (
<SonarrLogo className="h-10 w-10 flex-shrink-0" />
) : (
Expand Down
5 changes: 4 additions & 1 deletion src/components/Settings/SonarrModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLInputElement>) => {
setIsValidated(false);
setFieldValue('name', e.target.value);
Expand Down Expand Up @@ -505,7 +509,6 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
as="field"
id="apiKey"
name="apiKey"
autoComplete="one-time-code"
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setIsValidated(false);
setFieldValue('apiKey', e.target.value);
Expand Down
4 changes: 4 additions & 0 deletions src/components/UserList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ const UserList = () => {
name="email"
type="text"
inputMode="email"
autoComplete="off"
data-1pignore="true"
data-lpignore="true"
data-bwignore="true"
/>
</div>
{errors.email &&
Expand Down
Loading