11 lines
618 B
JavaScript
11 lines
618 B
JavaScript
"use strict";
|
|
// adpanel:login-error-codes — the login page shows only server-owned messages
|
|
// selected by code; query text is never echoed (content-spoofing on the most
|
|
// phishing-relevant page). Non-string query values (qs arrays/objects) are ignored.
|
|
const LOGIN_ERROR_CODE_SUSPENDED = "suspended";
|
|
const LOGIN_ERROR_MESSAGES = new Map([[LOGIN_ERROR_CODE_SUSPENDED, "Your account is suspended"]]);
|
|
function resolveLoginErrorMessage(rawCode) {
|
|
return typeof rawCode === "string" ? (LOGIN_ERROR_MESSAGES.get(rawCode) || null) : null;
|
|
}
|
|
module.exports = { LOGIN_ERROR_CODE_SUSPENDED, resolveLoginErrorMessage };
|