Skip to content

Commit

Permalink
fix: not check account is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Jan 9, 2021
1 parent 7c893f4 commit 8f2ea0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routes/api/CTE_BOT/controller/post_CTE.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ module.exports = async function (req ,res)
delete queryParams[element];
}
});
let authcode = await School_Auth.Auth(queryParams["username"] , queryParams["password"] , req);
let isAuth = authcode.split("_").length >= 2;
if (!isAuth) {
return res.redirect('/CTE_BOT?error=' + encodeURIComponent('Password_Error'));
}
let first = await fetchCookie("http://system1.ntunhs.edu.tw/intranetasp/evaMain/stLogin.asp" ,{method: 'GET'});


Expand Down

0 comments on commit 8f2ea0d

Please sign in to comment.