AIS3 pre-exam 2023 Writeup
前言 這次打了個第 8 名,但這次暑假有事情了,不能去 qq。 Web Login Panel app.post("/login", recaptcha.middleware.verify, (req, res) => { const { username, password } = req.body; db.get( `SELECT * FROM Users WHERE username = '${username}' AND password = '${password}'`, async (err, row) => { if (err) return res.redirect(`https://www.youtube.com/watch?v=dQw4w9WgXcQ`); if (!row) return res.redirect(`/login?msg=invalid_credentials`); if (row.username !== username) { // special case return res.redirect(`https://www.youtube.com/watch?v=E6jbBLrxY1U`); } if (req.recaptcha.error) { console.log(req.recaptcha.error); return res.redirect(`/login?msg=invalid_captcha`); } req.session.username = username; return res....