@@ -109,13 +109,14 @@ public function loginAction()
109
109
// Send the cookie with the authentication data
110
110
$ cookie = new Stuffpress_Cookie ($ user ->id );
111
111
$ cookie ->set ($ remember );
112
-
112
+
113
+ $ config = Zend_Registry::get ('configuration ' );
114
+ $ domain = trim ($ config ->web ->host , " / " );
115
+ $ path = trim ($ config ->web ->path , " / " );
116
+
117
+
113
118
// If we have a special target
114
- if ($ values ['target ' ] == 'user_page ' ) {
115
- $ config = Zend_Registry::get ('configuration ' );
116
- $ domain = trim ($ config ->web ->host , " / " );
117
- $ path = trim ($ config ->web ->path , " / " );
118
-
119
+ if ($ values ['target ' ] == 'user_page ' ) {
119
120
// If single user, we go back to the host
120
121
if (isset ($ config ->app ->user )) {
121
122
$ url = "http:// $ domain/ $ path " ;
@@ -126,7 +127,8 @@ public function loginAction()
126
127
return $ this ->_redirect ($ url );
127
128
}
128
129
else if ($ values ['target ' ]) {
129
- return $ this ->_redirect ($ values ['target ' ]);
130
+ $ target = trim ($ values ['target ' ], " / " );
131
+ return $ this ->_redirect ("http:// $ domain/ $ target " );
130
132
}
131
133
132
134
// Otherwise we go back to the home page
0 commit comments