|
@@ -141,11 +141,24 @@ function on_gp_success(a,b) {
|
|
|
}
|
|
|
|
|
|
function on_dat_success(a,b){
|
|
|
+ if(check_if_authfail(a,b)){
|
|
|
+ location.href = "sign-in1.html?from=entrance-1&msg=server-redirect-detected";
|
|
|
+ return;
|
|
|
+ }
|
|
|
if(check_if_success(a,b)) {
|
|
|
this.callme(a,b);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function check_if_authfail(a){
|
|
|
+ if(a == null || typeof a !== "string"){
|
|
|
+ if(a.indexOf("login?from=") > 0 || a.startsWith("<!DOCTYPE html>") || a.indexOf("<!-- SME::LOGINPAGE -->") > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
function check_if_success(a,b){
|
|
|
if(typeof a === "string"){
|
|
|
try {
|
|
@@ -410,7 +423,6 @@ function getUserId() {
|
|
|
try{
|
|
|
var mm = parseInt(use);
|
|
|
if(mm <= 0){
|
|
|
- location.href = "sign-in1.html?from=entrance-1&msg=cookie-wrong-format";
|
|
|
}else{
|
|
|
userId = mm;
|
|
|
}
|