Commit 6b95683307ab79d3bf4223e83a47339936cf0b41
Committed by
GitHub
Merge pull request #3107 from vvlladd28/bug/encode-email
[3.0] Fixed request 'resend activation'
Showing
2 changed files
with
6 additions
and
3 deletions
@@ -159,7 +159,8 @@ export class AuthService { | @@ -159,7 +159,8 @@ export class AuthService { | ||
159 | } | 159 | } |
160 | 160 | ||
161 | public resendEmailActivation(email: string) { | 161 | public resendEmailActivation(email: string) { |
162 | - return this.http.post(`/api/noauth/resendEmailActivation?email=${email}`, | 162 | + const encodeEmail = encodeURIComponent(email); |
163 | + return this.http.post(`/api/noauth/resendEmailActivation?email=${encodeEmail}`, | ||
163 | null, defaultHttpOptions()); | 164 | null, defaultHttpOptions()); |
164 | } | 165 | } |
165 | 166 |
@@ -18,10 +18,11 @@ import { Injectable } from '@angular/core'; | @@ -18,10 +18,11 @@ import { Injectable } from '@angular/core'; | ||
18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; | 18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; |
19 | import { User } from '@shared/models/user.model'; | 19 | import { User } from '@shared/models/user.model'; |
20 | import { Observable } from 'rxjs'; | 20 | import { Observable } from 'rxjs'; |
21 | -import { HttpClient } from '@angular/common/http'; | 21 | +import { HttpClient, HttpParams } from '@angular/common/http'; |
22 | import { PageLink } from '@shared/models/page/page-link'; | 22 | import { PageLink } from '@shared/models/page/page-link'; |
23 | import { PageData } from '@shared/models/page/page-data'; | 23 | import { PageData } from '@shared/models/page/page-data'; |
24 | import { isDefined } from '@core/utils'; | 24 | import { isDefined } from '@core/utils'; |
25 | +import { InterceptorHttpParams } from '@core/interceptors/interceptor-http-params'; | ||
25 | 26 | ||
26 | @Injectable({ | 27 | @Injectable({ |
27 | providedIn: 'root' | 28 | providedIn: 'root' |
@@ -71,7 +72,8 @@ export class UserService { | @@ -71,7 +72,8 @@ export class UserService { | ||
71 | } | 72 | } |
72 | 73 | ||
73 | public sendActivationEmail(email: string, config?: RequestConfig) { | 74 | public sendActivationEmail(email: string, config?: RequestConfig) { |
74 | - return this.http.post(`/api/user/sendActivationMail?email=${email}`, null, defaultHttpOptionsFromConfig(config)); | 75 | + const encodeEmail = encodeURIComponent(email); |
76 | + return this.http.post(`/api/user/sendActivationMail?email=${encodeEmail}`, null, defaultHttpOptionsFromConfig(config)); | ||
75 | } | 77 | } |
76 | 78 | ||
77 | public setUserCredentialsEnabled(userId: string, userCredentialsEnabled?: boolean, config?: RequestConfig): Observable<any> { | 79 | public setUserCredentialsEnabled(userId: string, userCredentialsEnabled?: boolean, config?: RequestConfig): Observable<any> { |