summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/login/login_controller.jsx2
-rw-r--r--webapp/components/root.jsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index c9930c406..cef7fe435 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -213,7 +213,7 @@ export default class LoginController extends React.Component {
finishSignin(team) {
const query = this.props.location.query;
GlobalActions.loadCurrentLocale();
- if (query.redirect_to) {
+ if (query.redirect_to && query.redirect_to.match(/^\//)) {
browserHistory.push(query.redirect_to);
} else if (team) {
browserHistory.push(`/${team.name}`);
diff --git a/webapp/components/root.jsx b/webapp/components/root.jsx
index 0332a8e0a..9e9ed1111 100644
--- a/webapp/components/root.jsx
+++ b/webapp/components/root.jsx
@@ -96,7 +96,7 @@ export default class Root extends React.Component {
} else if (UserStore.getCurrentUser()) {
GlobalActions.redirectUserToDefaultTeam();
} else {
- browserHistory.push('/login');
+ browserHistory.push('/login' + window.location.search);
}
}
}