mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix(core): Do not return inviteAcceptUrl in response if email was sent (#7465)
This commit is contained in:
committed by
GitHub
parent
ab6a9bbac2
commit
55c6a1b0d3
@@ -17,7 +17,6 @@ import { UserManagementMailer } from '@/UserManagement/email';
|
||||
|
||||
import { Response } from 'express';
|
||||
import { ILogger } from 'n8n-workflow';
|
||||
import { Config } from '@/config';
|
||||
import { PasswordResetRequest } from '@/requests';
|
||||
import { IExternalHooksClass, IInternalHooksClass } from '@/Interfaces';
|
||||
import { issueCookie } from '@/auth/jwt';
|
||||
@@ -35,7 +34,6 @@ import { MfaService } from '@/Mfa/mfa.service';
|
||||
@RestController()
|
||||
export class PasswordResetController {
|
||||
constructor(
|
||||
private readonly config: Config,
|
||||
private readonly logger: ILogger,
|
||||
private readonly externalHooks: IExternalHooksClass,
|
||||
private readonly internalHooks: IInternalHooksClass,
|
||||
@@ -50,7 +48,7 @@ export class PasswordResetController {
|
||||
*/
|
||||
@Post('/forgot-password')
|
||||
async forgotPassword(req: PasswordResetRequest.Email) {
|
||||
if (this.config.getEnv('userManagement.emails.mode') === '') {
|
||||
if (!this.mailer.isEmailSetUp) {
|
||||
this.logger.debug(
|
||||
'Request to send password reset email failed because emailing was not set up',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user