Skip to content

Commit

Permalink
Merge pull request #1375 from 4Science/CST-4767
Browse files Browse the repository at this point in the history
[CST-4767] Password are not properly url encoded at login
  • Loading branch information
tdonohue authored Oct 26, 2021
2 parents e8bebea + 035a782 commit 30b9eae
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
3 changes: 1 addition & 2 deletions src/app/core/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
UnsetUserAsIdleAction
} from './auth.actions';
import { NativeWindowRef, NativeWindowService } from '../services/window.service';
import { Base64EncodeUrl } from '../../shared/utils/encode-decode.util';
import { RouteService } from '../services/route.service';
import { EPersonDataService } from '../eperson/eperson-data.service';
import { getAllSucceededRemoteDataPayload } from '../shared/operators';
Expand Down Expand Up @@ -103,7 +102,7 @@ export class AuthService {
*/
public authenticate(user: string, password: string): Observable<AuthStatus> {
// Attempt authenticating the user using the supplied credentials.
const body = (`password=${Base64EncodeUrl(password)}&user=${Base64EncodeUrl(user)}`);
const body = (`password=${encodeURIComponent(password)}&user=${encodeURIComponent(user)}`);
const options: HttpOptions = Object.create({});
let headers = new HttpHeaders();
headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');
Expand Down
10 changes: 0 additions & 10 deletions src/app/shared/utils/encode-decode.util.spec.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/app/shared/utils/encode-decode.util.ts

This file was deleted.

0 comments on commit 30b9eae

Please sign in to comment.