Merge commit '9b96c33d5d3706f9c5795b9c07ace063f69b101d' into v2.x

isekai-main
Misty Release Bot 3 years ago
commit 2a97342035

@ -1,3 +1,19 @@
#### v2.4.4 (2022-08-18)
##### Chores
* incrementing version number - v2.4.3 (9c647c6c)
* update changelog for v2.4.3 (06da15a5)
* incrementing version number - v2.4.2 (3aa7b855)
* incrementing version number - v2.4.1 (60cbd148)
* incrementing version number - v2.4.0 (4834cde3)
* incrementing version number - v2.3.1 (d2425942)
* incrementing version number - v2.3.0 (046ea120)
##### Bug Fixes
* missing req, closes #10847 (489fb3a3)
#### v2.4.3 (2022-08-18)
##### Chores

@ -305,7 +305,7 @@ async function isPrivilegedOrSelfAndPasswordMatch(caller, data) {
async function processDeletion({ uid, method, password, caller }) {
const isTargetAdmin = await user.isAdministrator(uid);
const isSelf = parseInt(uid, 10) === caller.uid;
const isSelf = parseInt(uid, 10) === parseInt(caller.uid, 10);
const isAdmin = await user.isAdministrator(caller.uid);
if (isSelf && meta.config.allowAccountDelete !== 1) {

@ -25,6 +25,20 @@ Auth.initialize = function (app, middleware) {
Auth.app = app;
Auth.middleware = middleware;
// Apply wrapper around passport.authenticate to pass in keepSessionInfo option
const _authenticate = passport.authenticate;
passport.authenticate = (strategy, options, callback) => {
if (!callback && typeof options === 'function') {
return _authenticate.call(passport, strategy, options);
}
if (!options.hasOwnProperty('keepSessionInfo')) {
options.keepSessionInfo = true;
}
return _authenticate.call(passport, strategy, options, callback);
};
};
Auth.setAuthVars = function setAuthVars(req) {

Loading…
Cancel
Save