diff options
Diffstat (limited to 'src/routers/vault/middlewares')
-rw-r--r-- | src/routers/vault/middlewares/evol/account.js | 6 | ||||
-rw-r--r-- | src/routers/vault/middlewares/identity.js | 2 | ||||
-rw-r--r-- | src/routers/vault/middlewares/legacy/account.js | 4 | ||||
-rw-r--r-- | src/routers/vault/middlewares/session.js | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/routers/vault/middlewares/evol/account.js b/src/routers/vault/middlewares/evol/account.js index d7fe2e2..a889462 100644 --- a/src/routers/vault/middlewares/evol/account.js +++ b/src/routers/vault/middlewares/evol/account.js @@ -63,7 +63,7 @@ const new_account = async (req, res, next) => { accountType: "EVOL", actionType: "CREATE", accountId: evol_acc.accountId, - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); // immediately claim it @@ -153,7 +153,7 @@ const update_account = async (req, res, next) => { actionType: "UPDATE", details: "username", accountId: account.accountId, - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); } else { update_fields = { @@ -166,7 +166,7 @@ const update_account = async (req, res, next) => { actionType: "UPDATE", details: "password", accountId: account.accountId, - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); } diff --git a/src/routers/vault/middlewares/identity.js b/src/routers/vault/middlewares/identity.js index 3cae9e5..6f77134 100644 --- a/src/routers/vault/middlewares/identity.js +++ b/src/routers/vault/middlewares/identity.js @@ -81,7 +81,7 @@ const add_identity = async (req, res, next) => { userId: ident.vault, identityId: newIdent.id, action: "ADD", - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); await Claim.claim_accounts(req, ident.email, ident.vault); diff --git a/src/routers/vault/middlewares/legacy/account.js b/src/routers/vault/middlewares/legacy/account.js index 199ace3..50874ed 100644 --- a/src/routers/vault/middlewares/legacy/account.js +++ b/src/routers/vault/middlewares/legacy/account.js @@ -119,7 +119,7 @@ const claim_by_password = async (req, res, next) => { accountType: "LEGACY", actionType: "LINK", accountId: legacy.accountId, - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); // now we must update the session cache: @@ -229,7 +229,7 @@ const migrate = async (req, res, next) => { vaultId: session.vault, legacyId: legacy.accountId, accountId: evol_acc.accountId, - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); // immediately claim it diff --git a/src/routers/vault/middlewares/session.js b/src/routers/vault/middlewares/session.js index c9b7e13..454a235 100644 --- a/src/routers/vault/middlewares/session.js +++ b/src/routers/vault/middlewares/session.js @@ -33,7 +33,7 @@ const delete_session = async (req, res) => { req.app.locals.vault.login_log.create({ userId: session.vault, action: "LOGOUT", - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); req.app.locals.session.delete(token); @@ -129,7 +129,7 @@ const auth_session = async (req, res) => { req.app.locals.vault.login_log.create({ userId: user.id, action: "CREATE", - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); /** @type {Identity} */ @@ -142,7 +142,7 @@ const auth_session = async (req, res) => { userId: user.id, identityId: ident.id, action: "ADD", - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); user.primaryIdentity = ident.id; @@ -194,7 +194,7 @@ const auth_session = async (req, res) => { req.app.locals.vault.login_log.create({ userId: session.vault, action: "LOGIN", - ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip), + ip: req.ip, }); if (session.identity !== session.primaryIdentity) { |