PLT-7521: improve regex pattern (#7345)

* PLT-7521: improve regex pattern

* style fix
This commit is contained in:
Chris
2017-09-04 04:45:37 -05:00
committed by George Goldberg
parent 6a10941cb3
commit 8391ef6288

View File

@@ -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}`);