From eb6543a738c8188deeb06c4a64327975365b6c3c Mon Sep 17 00:00:00 2001 From: yu-i-i Date: Thu, 29 Jan 2026 03:04:29 +0100 Subject: [PATCH] Authentication: Fix import after upstream converted some files to ESM --- .../ldap/app/src/LDAPAuthenticationController.mjs | 4 ++-- .../ldap/app/src/LDAPAuthenticationManager.mjs | 4 ++-- .../modules/authentication/ldap/app/src/LDAPContacts.mjs | 2 +- .../web/modules/authentication/ldap/app/src/LDAPRouter.mjs | 2 +- .../oidc/app/src/OIDCAuthenticationController.mjs | 4 ++-- .../oidc/app/src/OIDCAuthenticationManager.mjs | 6 +++--- .../saml/app/src/SAMLAuthenticationController.mjs | 6 +++--- .../saml/app/src/SAMLAuthenticationManager.mjs | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationController.mjs b/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationController.mjs index eea4f7d445..425389c2a1 100644 --- a/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationController.mjs +++ b/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationController.mjs @@ -1,7 +1,7 @@ import logger from '@overleaf/logger' import passport from 'passport' -import EmailHelper from '../../../../../app/src/Features/Helpers/EmailHelper.js' -import { handleAuthenticateErrors } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.js' +import EmailHelper from '../../../../../app/src/Features/Helpers/EmailHelper.mjs' +import { handleAuthenticateErrors } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs' import AuthenticationController from '../../../../../app/src/Features/Authentication/AuthenticationController.mjs' import LDAPAuthenticationManager from './LDAPAuthenticationManager.mjs' diff --git a/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationManager.mjs b/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationManager.mjs index b1cf2f3682..6ec31fcdea 100644 --- a/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationManager.mjs +++ b/services/web/modules/authentication/ldap/app/src/LDAPAuthenticationManager.mjs @@ -1,8 +1,8 @@ import Settings from '@overleaf/settings' import { callbackify } from '@overleaf/promise-utils' import UserCreator from '../../../../../app/src/Features/User/UserCreator.mjs' -import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.js' -import { User } from '../../../../../app/src/models/User.js' +import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs' +import { User } from '../../../../../app/src/models/User.mjs' import { splitFullName } from '../../../utils.mjs' const LDAPAuthenticationManager = { diff --git a/services/web/modules/authentication/ldap/app/src/LDAPContacts.mjs b/services/web/modules/authentication/ldap/app/src/LDAPContacts.mjs index 4557b4a4e4..101716aefe 100644 --- a/services/web/modules/authentication/ldap/app/src/LDAPContacts.mjs +++ b/services/web/modules/authentication/ldap/app/src/LDAPContacts.mjs @@ -3,7 +3,7 @@ import logger from '@overleaf/logger' import { promisify } from 'util' import passport from 'passport' import ldapjs from 'ldapauth-fork/node_modules/ldapjs/lib/index.js' -import UserGetter from '../../../../../app/src/Features/User/UserGetter.js' +import UserGetter from '../../../../../app/src/Features/User/UserGetter.mjs' import { splitFullName } from '../../../utils.mjs' function _searchLDAP(client, baseDN, options) { diff --git a/services/web/modules/authentication/ldap/app/src/LDAPRouter.mjs b/services/web/modules/authentication/ldap/app/src/LDAPRouter.mjs index 7fbc99e96b..98f02a3c69 100644 --- a/services/web/modules/authentication/ldap/app/src/LDAPRouter.mjs +++ b/services/web/modules/authentication/ldap/app/src/LDAPRouter.mjs @@ -2,7 +2,7 @@ import logger from '@overleaf/logger' import RateLimiterMiddleware from '../../../../../app/src/Features/Security/RateLimiterMiddleware.mjs' import CaptchaMiddleware from '../../../../../app/src/Features/Captcha/CaptchaMiddleware.mjs' import AuthenticationController from '../../../../../app/src/Features/Authentication/AuthenticationController.mjs' -import { overleafLoginRateLimiter } from '../../../../../app/src/infrastructure/RateLimiter.js' +import { overleafLoginRateLimiter } from '../../../../../app/src/infrastructure/RateLimiter.mjs' import LDAPAuthenticationController from './LDAPAuthenticationController.mjs' export default { diff --git a/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationController.mjs b/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationController.mjs index 33162ec26d..cc4238e327 100644 --- a/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationController.mjs +++ b/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationController.mjs @@ -3,9 +3,9 @@ import passport from 'passport' import Settings from '@overleaf/settings' import AuthenticationController from '../../../../../app/src/Features/Authentication/AuthenticationController.mjs' import UserController from '../../../../../app/src/Features/User/UserController.mjs' -import ThirdPartyIdentityManager from '../../../../../app/src/Features/User/ThirdPartyIdentityManager.js' +import ThirdPartyIdentityManager from '../../../../../app/src/Features/User/ThirdPartyIdentityManager.mjs' import OIDCAuthenticationManager from './OIDCAuthenticationManager.mjs' -import { acceptsJson } from '../../../../../app/src/infrastructure/RequestContentTypeDetection.js' +import { acceptsJson } from '../../../../../app/src/infrastructure/RequestContentTypeDetection.mjs' const OIDCAuthenticationController = { passportLogin(req, res, next) { diff --git a/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationManager.mjs b/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationManager.mjs index 69b0227056..a6cecd3b54 100644 --- a/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationManager.mjs +++ b/services/web/modules/authentication/oidc/app/src/OIDCAuthenticationManager.mjs @@ -1,8 +1,8 @@ import Settings from '@overleaf/settings' import UserCreator from '../../../../../app/src/Features/User/UserCreator.mjs' -import ThirdPartyIdentityManager from '../../../../../app/src/Features/User/ThirdPartyIdentityManager.js' -import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.js' -import { User } from '../../../../../app/src/models/User.js' +import ThirdPartyIdentityManager from '../../../../../app/src/Features/User/ThirdPartyIdentityManager.mjs' +import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs' +import { User } from '../../../../../app/src/models/User.mjs' const OIDCAuthenticationManager = { async findOrCreateUser(profile, auditLog) { diff --git a/services/web/modules/authentication/saml/app/src/SAMLAuthenticationController.mjs b/services/web/modules/authentication/saml/app/src/SAMLAuthenticationController.mjs index 378c80e2b7..c124d94160 100644 --- a/services/web/modules/authentication/saml/app/src/SAMLAuthenticationController.mjs +++ b/services/web/modules/authentication/saml/app/src/SAMLAuthenticationController.mjs @@ -4,9 +4,9 @@ import passport from 'passport' import AuthenticationController from '../../../../../app/src/Features/Authentication/AuthenticationController.mjs' import SAMLAuthenticationManager from './SAMLAuthenticationManager.mjs' import UserController from '../../../../../app/src/Features/User/UserController.mjs' -import UserSessionsManager from '../../../../../app/src/Features/User/UserSessionsManager.js' -import { handleAuthenticateErrors } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.js' -import { xmlResponse } from '../../../../../app/src/infrastructure/Response.js' +import UserSessionsManager from '../../../../../app/src/Features/User/UserSessionsManager.mjs' +import { handleAuthenticateErrors } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs' +import { xmlResponse } from '../../../../../app/src/infrastructure/Response.mjs' import { readFilesContentFromEnv } from '../../../utils.mjs' const SAMLAuthenticationController = { diff --git a/services/web/modules/authentication/saml/app/src/SAMLAuthenticationManager.mjs b/services/web/modules/authentication/saml/app/src/SAMLAuthenticationManager.mjs index e6bbef99a6..40947971a8 100644 --- a/services/web/modules/authentication/saml/app/src/SAMLAuthenticationManager.mjs +++ b/services/web/modules/authentication/saml/app/src/SAMLAuthenticationManager.mjs @@ -1,8 +1,8 @@ import Settings from '@overleaf/settings' import UserCreator from '../../../../../app/src/Features/User/UserCreator.mjs' -import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.js' +import { ParallelLoginError } from '../../../../../app/src/Features/Authentication/AuthenticationErrors.mjs' import SAMLIdentityManager from '../../../../../app/src/Features/User/SAMLIdentityManager.mjs' -import { User } from '../../../../../app/src/models/User.js' +import { User } from '../../../../../app/src/models/User.mjs' const SAMLAuthenticationManager = { async findOrCreateUser(profile, auditLog) {