Skip to content

Commit 30b9eae

Browse files
authored
Merge pull request #1375 from 4Science/CST-4767
[CST-4767] Password are not properly url encoded at login
2 parents e8bebea + 035a782 commit 30b9eae

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

src/app/core/auth/auth.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import {
4242
UnsetUserAsIdleAction
4343
} from './auth.actions';
4444
import { NativeWindowRef, NativeWindowService } from '../services/window.service';
45-
import { Base64EncodeUrl } from '../../shared/utils/encode-decode.util';
4645
import { RouteService } from '../services/route.service';
4746
import { EPersonDataService } from '../eperson/eperson-data.service';
4847
import { getAllSucceededRemoteDataPayload } from '../shared/operators';
@@ -103,7 +102,7 @@ export class AuthService {
103102
*/
104103
public authenticate(user: string, password: string): Observable<AuthStatus> {
105104
// Attempt authenticating the user using the supplied credentials.
106-
const body = (`password=${Base64EncodeUrl(password)}&user=${Base64EncodeUrl(user)}`);
105+
const body = (`password=${encodeURIComponent(password)}&user=${encodeURIComponent(user)}`);
107106
const options: HttpOptions = Object.create({});
108107
let headers = new HttpHeaders();
109108
headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');

src/app/shared/utils/encode-decode.util.spec.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/shared/utils/encode-decode.util.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)