File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,20 @@ export class ApiController {
110
110
encodedBase64Key === undefined
111
111
? CryptoJS . enc . Base64 . parse ( 'bla' )
112
112
: CryptoJS . enc . Base64 . parse ( encodedBase64Key ) ;
113
- const loginId = this . apiService . decrypt ( user . loginId , parsedBase64Key ) ;
114
- const password = this . apiService . decrypt ( user . password , parsedBase64Key ) ;
113
+
114
+ let loginId = '' ;
115
+ try {
116
+ loginId = this . apiService . decrypt ( user . loginId , parsedBase64Key ) ;
117
+ } catch ( e ) {
118
+ console . log ( `Problem in decrypting loginId: ${ user . loginId } ` ) ;
119
+ }
120
+
121
+ let password = '' ;
122
+ try {
123
+ password = this . apiService . decrypt ( user . password , parsedBase64Key ) ;
124
+ } catch ( e ) {
125
+ console . log ( `Problem in decrypting password: ${ user . password } ` ) ;
126
+ }
115
127
116
128
// if we are not able to decrypt, we'll try to authenticate with the original creds
117
129
user . loginId = loginId ? loginId : user . loginId ;
You can’t perform that action at this time.
0 commit comments