fix(striker-ui): add external link to MITM wiki in ManageChangedSSHKeysForm

main
Tsu-ba-me 2 years ago
parent 9d171ee607
commit 57735063f7
  1. 27
      striker-ui/components/StrikerConfig/ManageChangedSSHKeysForm.tsx
  2. 14
      striker-ui/types/ManageChangedSSHKeysForm.d.ts

@ -2,6 +2,7 @@ import { FC, useMemo, useRef } from 'react';
import Divider from '../Divider'; import Divider from '../Divider';
import FlexBox from '../FlexBox'; import FlexBox from '../FlexBox';
import Link from '../Link';
import List from '../List'; import List from '../List';
import MessageBox from '../MessageBox'; import MessageBox from '../MessageBox';
import { ExpandablePanel } from '../Panels'; import { ExpandablePanel } from '../Panels';
@ -9,16 +10,9 @@ import { BodyText } from '../Text';
import useProtect from '../../hooks/useProtect'; import useProtect from '../../hooks/useProtect';
import useProtectedState from '../../hooks/useProtectedState'; import useProtectedState from '../../hooks/useProtectedState';
type ChangedSSHKeys = { const ManageChangedSSHKeysForm: FC<ManageChangedSSHKeysFormProps> = ({
[hostUUID: string]: { mitmExternalHref = 'https://en.wikipedia.org/wiki/Man-in-the-middle_attack',
hostName: string; }) => {
hostUUID: string;
ipAddress: string;
isChecked?: boolean;
};
};
const ManageChangedSSHKeysForm: FC = () => {
const { protect } = useProtect(); const { protect } = useProtect();
const listRef = useRef<ListForwardedRefContent>({}); const listRef = useRef<ListForwardedRefContent>({});
@ -41,9 +35,16 @@ const ManageChangedSSHKeysForm: FC = () => {
</BodyText> </BodyText>
<MessageBox type="warning" isAllowClose> <MessageBox type="warning" isAllowClose>
If you haven&apos;t rebuilt the listed targets, then you could be If you haven&apos;t rebuilt the listed targets, then you could be
experiencing a &quot;Man In The Middle&quot; attack. Please verify the experiencing a &quot;
targets have changed for a known reason before proceeding to remove <Link
the broken keys. href={mitmExternalHref}
sx={{ display: 'inline-flex' }}
target="_blank"
>
Man In The Middle
</Link>
&quot; attack. Please verify the targets have changed for a known
reason before proceeding to remove the broken keys.
</MessageBox> </MessageBox>
<List <List
header={ header={

@ -0,0 +1,14 @@
type ChangedSSHKeys = {
[hostUUID: string]: {
hostName: string;
hostUUID: string;
ipAddress: string;
isChecked?: boolean;
};
};
type ManageChangedSSHKeysFormOptionalProps = {
mitmExternalHref?: LinkProps['href'];
};
type ManageChangedSSHKeysFormProps = ManageChangedSSHKeysFormOptionalProps;
Loading…
Cancel
Save