mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
Login: Fix sanitize input for signin url (#64203)
fix: sanitize input for signin
This commit is contained in:
parent
43e281271b
commit
15fb7e99d9
@ -2,13 +2,13 @@ import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { GrafanaTheme2, locationUtil } from '@grafana/data';
|
||||
import { GrafanaTheme2, locationUtil, textUtil } from '@grafana/data';
|
||||
import { useStyles2 } from '@grafana/ui';
|
||||
|
||||
export function SignInLink() {
|
||||
const location = useLocation();
|
||||
const styles = useStyles2(getStyles);
|
||||
const loginUrl = locationUtil.getUrlForPartial(location, { forceLogin: 'true' });
|
||||
const loginUrl = textUtil.sanitizeUrl(locationUtil.getUrlForPartial(location, { forceLogin: 'true' }));
|
||||
|
||||
return (
|
||||
<a className={styles.link} href={loginUrl} target="_self">
|
||||
|
Loading…
Reference in New Issue
Block a user