details: https://code.openbravo.com/erp/devel/pi/rev/de42e672ad86
changeset: 13169:de42e672ad86
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Fri Jul 15 15:30:15 2011 +0200
summary: Fixes issue 0017543: On session time out strange parameters are
added to the url, page can not be refreshed after that
It has been modified the class DefaultAuthenticationManager to not to save the
target and targetQueryString if it is an Ajax call
diffstat:
src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java | 38
+++++-----
1 files changed, 19 insertions(+), 19 deletions(-)
diffs (51 lines):
diff -r 2bafb6e816fc -r de42e672ad86
src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java
--- a/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java
Fri Jul 15 15:17:17 2011 +0200
+++ b/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java
Fri Jul 15 15:30:15 2011 +0200
@@ -73,28 +73,28 @@
*/
VariablesHistory variables = new VariablesHistory(request);
- // redirects to the menu or the menu with the target
- String strTarget = request.getRequestURL().toString();
- if (!strTarget.endsWith("/security/Menu.html")) {
- variables.setSessionValue("targetmenu", strTarget);
- }
-
- String qString = request.getQueryString();
-
- String strDireccionLocal = HttpBaseUtils.getLocalAddress(request);
-
- // Storing target string to redirect after a successful login
- variables.setSessionValue("target", strDireccionLocal +
"/security/Menu.html"
- + (qString != null && !qString.equals("") ? "?" + qString : ""));
- if (qString != null && !qString.equals("")) {
- variables.setSessionValue("targetQueryString", qString);
- }
-
- if (strAjax != null && !strAjax.equals(""))
+ if (strAjax != null && !strAjax.equals("")) {
bdErrorAjax(response, "Error", "",
Utility.messageBD(this.conn, "NotLogged",
variables.getLanguage()));
- else
+ } else {
+ // redirects to the menu or the menu with the target
+ String strTarget = request.getRequestURL().toString();
+ if (!strTarget.endsWith("/security/Menu.html")) {
+ variables.setSessionValue("targetmenu", strTarget);
+ }
+
+ String qString = request.getQueryString();
+
+ String strDireccionLocal = HttpBaseUtils.getLocalAddress(request);
+
+ // Storing target string to redirect after a successful login
+ variables.setSessionValue("target", strDireccionLocal +
"/security/Menu.html"
+ + (qString != null && !qString.equals("") ? "?" + qString : ""));
+ if (qString != null && !qString.equals("")) {
+ variables.setSessionValue("targetQueryString", qString);
+ }
response.sendRedirect(strDireccionLocal + strServletSinIdentificar);
+ }
return null;
} else {
return sUserId;
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits