Tomcat 8
Shiro 1.6.0
SSM framework
Phenomenon: in addition to the problem of account, all the land no problem, the problem of account into Chinese: Wan Xiang logistics, after landing direct flash back
Solution: change any useless, password change any can normal login account name
Landing restrictions: other browsers after landing can crowd out current browsers, single sign-on
Control shiro core code
//to get correct verification code from the session
It it=(it) request;
The HttpSession session.=it getSession ();
Echo//access account name (set)
String username=it. The getParameter (getUsernameParam ());
It. The setAttribute (" username ", username);
//get the password set (echo)
String password=it. The getParameter (getPasswordParam ());
It. The setAttribute (" password ", ");
If (this. IsLoginRequest (request, response)) {
Return super. OnAccessDenied (request, response);
} else {
ResObj data=https://bbs.csdn.net/topics/new ResObj ();
Data. SetSuccess (true);
Data. SetCode (301);
HttpServletResponse HttpServletResponse=(HttpServletResponse) response;
HttpServletResponse. SetStatus (200);
WebUtil. SendJson (httpServletResponse, data);
return false;
}
Use the account all the requests will go else after landing, front-end interface automatically request, so flash back phenomenon
Long run until yesterday is no problem, today suddenly, without exception, is fine for local test
To solve the causes of the problem or other possible causes, thank you
CodePudding user response:
A breakpoint at the output, I think this is the best way to deal with these eventsOnline you can make a log, input account and password and some parameters you need