mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-7521: improve regex pattern (#7345)
* PLT-7521: improve regex pattern * style fix
This commit is contained in:
@@ -210,7 +210,7 @@ export default class LoginController extends React.Component {
|
||||
finishSignin(team) {
|
||||
const query = this.props.location.query;
|
||||
GlobalActions.loadCurrentLocale();
|
||||
if (query.redirect_to && query.redirect_to.match(/^\//)) {
|
||||
if (query.redirect_to && query.redirect_to.match(/^\/([^/]|$)/)) {
|
||||
browserHistory.push(query.redirect_to);
|
||||
} else if (team) {
|
||||
browserHistory.push(`/${team.name}`);
|
||||
|
||||
Reference in New Issue
Block a user